For every positive integer $N\geq 2$ with prime factorisation $N=p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k}$ we define \[f(N):=1+p_1a_1+p_2a_2+\cdots+p_ka_k.\] Let $x_0\geq 2$ be a positive integer. We define the sequence $x_{n+1}=f(x_n)$ for all $n\geq 0.$ Prove that this sequence is eventually periodic and determine its fundamental period.
1. **Define the function \( f(N) \):**
   Given a positive integer \( N \geq 2 \) with prime factorization \( N = p_1^{a_1} p_2^{a_2} \cdots p_k^{a_k} \), the function \( f(N) \) is defined as:
   \[
   f(N) = 1 + p_1 a_1 + p_2 a_2 + \cdots + p_k a_k
   \]

2. **Behavior of \( f(N) \) for composite numbers:**
   For a composite number \( N \) with prime factorization \( N = p_1^{a_1} p_2^{a_2} \cdots p_k^{a_k} \), we can observe that:
   \[
   f(N) = 1 + \sum_{i=1}^k p_i a_i
   \]
   Since \( p_i \geq 2 \) for all \( i \) and \( a_i \geq 1 \), we have:
   \[
   f(N) \leq 1 + 2(a_1 + a_2 + \cdots + a_k)
   \]
   This is because the smallest prime is 2, and the sum of the exponents \( a_i \) is at least 1 for each prime factor.

3. **Bounding \( f(N) \):**
   We need to show that \( f(N) \) is eventually less than \( N \) for large \( N \). Consider the inequality:
   \[
   f(N) < N
   \]
   For \( N \) with \( k \) prime factors, we have:
   \[
   f(N) \leq 1 + 2k
   \]
   Since \( N \geq 2^k \), we need to show:
   \[
   1 + 2k < 2^k
   \]
   This inequality holds for \( k \geq 3 \). For \( k = 2 \), we need \( N > 6 \), and for \( k = 3 \), we need \( N > 8 \).

4. **Behavior for small \( N \):**
   - For \( N = 2 \), \( f(2) = 1 + 2 \cdot 1 = 3 \)
   - For \( N = 3 \), \( f(3) = 1 + 3 \cdot 1 = 4 \)
   - For \( N = 4 \), \( f(4) = 1 + 2 \cdot 2 = 5 \)
   - For \( N = 5 \), \( f(5) = 1 + 5 \cdot 1 = 6 \)
   - For \( N = 6 \), \( f(6) = 1 + 2 \cdot 1 + 3 \cdot 1 = 6 \)
   - For \( N = 7 \), \( f(7) = 1 + 7 \cdot 1 = 8 \)
   - For \( N = 8 \), \( f(8) = 1 + 2 \cdot 3 = 7 \)

5. **Periodic behavior:**
   From the above calculations, we observe:
   - \( 6 \rightarrow 6 \) (period 1)
   - \( 7 \rightarrow 8 \rightarrow 7 \) (period 2)

6. **Conclusion:**
   The sequence \( x_{n+1} = f(x_n) \) is eventually periodic with a fundamental period of 1 or 2, depending on the starting value.

\[
\boxed{2}
\]