Let $\mathbb{N}$ be the set of positive integers. Determine all positive integers $k$ for which there exist functions $f:\mathbb{N} \to \mathbb{N}$ and $g: \mathbb{N}\to \mathbb{N}$ such that $g$ assumes infinitely many values  and such that $$ f^{g(n)}(n)=f(n)+k$$ holds for every positive integer $n$.

([i]Remark.[/i] Here, $f^{i}$ denotes the function $f$ applied $i$ times i.e $f^{i}(j)=f(f(\dots f(j)\dots ))$.)
1. **Define the problem and notation:**
   We are given functions \( f: \mathbb{N} \to \mathbb{N} \) and \( g: \mathbb{N} \to \mathbb{N} \) such that \( g \) assumes infinitely many values. We need to find all positive integers \( k \) for which the equation
   \[
   f^{g(n)}(n) = f(n) + k
   \]
   holds for every positive integer \( n \). Here, \( f^i \) denotes the function \( f \) applied \( i \) times.

2. **Introduce the assertion \( P(n) \):**
   Let \( P(n) \) denote the assertion \( f^{g(n)}(n) = f(n) + k \).

3. **Sublemma 01:**
   There exists \( m_0 \) such that \( f(m) = f(n) + ak \) for any \( n, a \in \mathbb{N} \).

   **Proof:**
   We use induction. Notice that there exists an integer \( m_1 \) such that \( f(m_1) = f(n) + k \). Consider \( P(m_1) \), we then have \( m_2 \) such that \( f(m_2) = f(m_1) + k = f(n) + 2k \). Continuing this by induction, we get our desired result.

4. **Sublemma 02:**
   For any integer \( \ell, m \), we have \( f^{\ell}(f(n) + mk) = f^{\ell + 1}(n) + mk \).

   **Proof:**
   We prove this by induction. By the standard trick,
   \[
   f(f(n) + k) = f(f^{g(n)}(n)) = f^{g(n)}(f(n)) = f(f(n)) + k
   \]
   Therefore, we can get that if \( f^{\ell} (f(n)+k) = f^{\ell + 1}(n) + k \), then
   \[
   f^{\ell + 1}(f(n) + k) = f^{\ell}(f(f(n)) + k) = f^{\ell + 1}(f(n)) + k = f^{\ell + 2}(n) + k
   \]
   Now consider \( m_{a - 1} \) such that \( f(m_{a - 1}) = f(n) + (a - 1)k = f(m_{a - 2}) + k \) which exists by Sublemma 01, then
   \[
   f^{\ell} (m_a) =  f^{\ell - 1}(f(m_{a - 1}) + k) = f^{\ell}(m_{a - 1}) + k \Rightarrow  f^{\ell}(f(n) + ak) = f^{\ell + 1}(n) + ak
   \]

5. **Main Claim:**
   There doesn't exist any value of \( \ell > 0 \) such that \( f^{\ell} (n) = n \) for any \( n \in \mathbb{N} \).

   **Proof:**
   Define \( \mathcal{A} \) as the set of values of \( f^{k}(n) \), where \( k \in \mathbb{N} \). To prove this, we'll prove that \( f^a(n) + ak \in \mathcal{A} \) for any \( a \in \mathbb{N} \). We'll prove this by induction. For \( n = 1 \), this is obvious. Then, plug \( P(f^{g(n)}(n)) \) and we have
   \[
   f^{g(f(n) + k) + g(n)}(n) = f(f(n)) + 2k
   \]
   Now, suppose \( f^{a}(n) + ak \in \mathcal{A} \), then we have \( f^{X_{n,a}}(n) = f^a(n) + ak \) for some \( n,a \) and \( X_{n,a} \) is a variable depending on \( n \) and \( a \). Then, replace all \( n \) with \( f^{g(n)}(n) = f(n) + k \), we get
   \[
   f^{X_{f(n) + k,a} + g(n)}(n) = f^a(f(n) + k) + ak = f^{a + 1}(n) + (a + 1)k
   \]
   Therefore, we are done by induction. Now notice that the sequence \( \{f^i(k) + ik\}_{i = 1}^{\infty} \) is unbounded. Since they are all members of \( \mathcal{A} \), then \( |\mathcal{A}| = +\infty \). However, if there exists \( \ell \) such that \( f^{\ell}(n) = n \), then \( |\mathcal{A}| \) is finite, a contradiction.

6. **Final steps:**
   Now, to finish this problem off. Notice that \( P(f(n) + ak) \) gives us
   \[
   f^{g(f(n) + ak)}(f(n) + ak) = f(f(n) + ak) + k
   \]
   By our lemma, \( f^{g(f(n) + ak) + 1}(n) + ak = LHS = RHS = f(f(n)) + (a + 1)k \), which therefore gives us
   \[
   f^{g(f(n) + ak) + 1}(n) = f(f(n)) + k
   \]
   for any \( a \in \mathbb{N} \). However, this gives us
   \[
   f^{g(f(n) + ak) + 1}(n) = f(f(n)) + k = f(f(n) + k) = f(f^{g(n)}(n)) = f^{g(n) + 1}(n)
   \]
   Therefore, we have
   \[
   f^{|g(f(n) + ak) - g(n)|}(n) = n
   \]
   for all \( n \in \mathbb{N} \). Therefore, we have \( g(n) = g(f(n) + ak) \) for all \( a \in \mathbb{N} \). For \( k = 1 \), there are no such functions obviously as this contradicts \( g \) is unbounded.

7. **Construction for \( k \ge 2 \):**
   Consider \( f(k^n) = nk + 1 \) and \( f(nk + 1) = k^n + 2 \). For any \( a \), which is not a power of \( k \), we can let \( f(ak) = ak + 2 \) and define \( f(x) = x + 1 \) for any other integers \( x \) not mentioned. One can define \( g(n) \) to be the smallest \( m \) satisfying \( f^m(n) = f(n) + k \). One can check that \( g \) is unbounded since \( g(nk + 1) \) is the number of integers \( m \) such that \( k^n + 2 \le m \le k^{n + 1} \) and \( k \nmid m - 1 \).

The final answer is \( \boxed{\text{all } k \ge 2} \)