Find all positive integers $n$ and $p$ if $p$ is prime and \[ n^8 - p^5 = n^2+p^2 . \] 
[i]Adrian Stoica[/i]
1. **Initial Setup and Simplification:**
   We start with the given equation:
   \[
   n^8 - p^5 = n^2 + p^2
   \]
   Rearrange it to:
   \[
   n^8 - n^2 = p^5 + p^2
   \]
   Factor the left-hand side:
   \[
   n^2(n^6 - 1) = p^2(p^3 + 1)
   \]

2. **Considering Small Values of \( p \):**
   - For \( p = 2 \):
     \[
     n^8 - 2^5 = n^2 + 2^2 \implies n^8 - 32 = n^2 + 4 \implies n^8 - n^2 = 36
     \]
     This equation does not yield any integer solutions for \( n \).

   - For \( p = 3 \):
     \[
     n^8 - 3^5 = n^2 + 3^2 \implies n^8 - 243 = n^2 + 9 \implies n^8 - n^2 = 252
     \]
     Testing small values of \( n \):
     \[
     n = 2 \implies 2^8 - 2^2 = 256 - 4 = 252
     \]
     This is a valid solution. So, \( (n, p) = (2, 3) \).

3. **Considering Larger Values of \( p \):**
   Assume \( p > 3 \). We need to analyze the divisibility conditions:
   \[
   p^2(p^3 + 1) = n^2(n^6 - 1)
   \]
   Since \( p \) is a prime, \( p \mid n \) or \( p \mid n^6 - 1 \).

4. **Case Analysis:**
   - **Case 1: \( p \mid n \):**
     Let \( n = pk \). Substitute into the equation:
     \[
     (pk)^8 - p^5 = (pk)^2 + p^2 \implies p^8 k^8 - p^5 = p^2 k^2 + p^2
     \]
     Simplify:
     \[
     p^2(p^6 k^8 - p^3) = p^2(k^2 + 1) \implies p^6 k^8 - p^3 = k^2 + 1
     \]
     This implies:
     \[
     p^3(k^8 p^3 - 1) = k^2 + 1
     \]
     Since \( p \mid k^2 + 1 \), by Lemma 1, \( p \equiv 1 \pmod{4} \). This contradicts our earlier conditions.

   - **Case 2: \( p \mid n^6 - 1 \):**
     Since \( n^6 - 1 = (n^2 - 1)(n^4 + n^2 + 1) \), we have:
     \[
     p^2 \mid (n^2 - 1)(n^4 + n^2 + 1)
     \]
     Since \( \gcd(n^2 - 1, n^4 + n^2 + 1) \mid 2 \), we consider:
     - If \( p^2 \mid n^2 - 1 \), then \( n^2 \equiv 1 \pmod{p^2} \). This implies \( n \equiv \pm 1 \pmod{p^2} \).
     - If \( p^2 \mid n^4 + n^2 + 1 \), then by Lemma 2, \( p \equiv 1 \pmod{3} \), which contradicts \( p \equiv 2 \pmod{3} \).

5. **Bounding \( n \) and \( p \):**
   From the equation:
   \[
   p^5 + p^2 \geq n^3 + 1
   \]
   and considering \( n \geq p^2 - 1 \):
   \[
   p^5 + p^2 \geq (p^2 - 1)^3 + 1
   \]
   Simplify:
   \[
   p^5 + p^2 \geq p^6 - 3p^4 + 3p^2 - 1 + 1
   \]
   This inequality does not hold for \( p > 3 \).

Thus, the only solution is \( (n, p) = (2, 3) \).

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