Define a function $f:\mathbb{N}\rightarrow\mathbb{N}$, \[f(1)=p+1,\] \[f(n+1)=f(1)\cdot f(2)\cdots f(n)+p,\] where $p$ is a prime number. Find all $p$ such that there exists a natural number $k$ such that $f(k)$ is a perfect square.
1. **Define the function and initial conditions:**
   \[
   f:\mathbb{N} \rightarrow \mathbb{N}, \quad f(1) = p + 1, \quad f(n+1) = f(1) \cdot f(2) \cdots f(n) + p
   \]
   where \( p \) is a prime number.

2. **Consider the function modulo 4:**
   - Primes \( p \) can be \( 1 \mod 4 \), \( 3 \mod 4 \), or \( p = 2 \).

3. **Case 1: \( p \equiv 1 \mod 4 \):**
   - \( f(1) = p + 1 \equiv 2 \mod 4 \)
   - \( f(2) = f(1) \cdot f(1) + p = 2 \cdot 2 + p \equiv 4 + 1 \equiv 1 \mod 4 \)
   - For \( n \geq 2 \), \( f(n) \equiv 1 \mod 4 \)
   - Since \( f(n) \equiv 1 \mod 4 \) for \( n \geq 2 \), it cannot be a perfect square (as perfect squares modulo 4 are 0 or 1).

4. **Case 2: \( p \equiv 3 \mod 4 \):**
   - \( f(1) = p + 1 \equiv 0 \mod 4 \)
   - For \( n \geq 2 \), \( f(n) \equiv 0 \mod 4 \)
   - Since \( f(n) \equiv 0 \mod 4 \) for \( n \geq 2 \), it cannot be a perfect square (as perfect squares modulo 4 are 0 or 1).

5. **Case 3: \( p = 2 \):**
   - \( f(1) = p + 1 = 3 \equiv 0 \mod 3 \)
   - For \( n \geq 2 \), \( f(n) \equiv 2 \mod 3 \)
   - Since \( f(n) \equiv 2 \mod 3 \) for \( n \geq 2 \), it cannot be a perfect square (as perfect squares modulo 3 are 0 or 1).

6. **Special case for \( p = 3 \):**
   - \( f(1) = p + 1 = 4 = 2^2 \)
   - \( f(1) \) is a perfect square.

Thus, the only prime \( p \) for which there exists a natural number \( k \) such that \( f(k) \) is a perfect square is \( p = 3 \).

The final answer is \( \boxed{ p = 3 } \)