<s>[INST] Let $p$ be a prime number for which also $p^2+2$ is a prime. Show that then $p^3+2$ is also a prime. 
Let $p$ be a prime number for which also $p^2+2$ is a prime. Show that then $p^3+2$ is also a prime.

Computing few first primes I got:
$p=2$: $2^2+2=6$ (not satisfying the condition)
$p=3$: $3^2+2=11$ (satisfying the condition)
$p=5$: $5^2+2=27$ (not satisfying the condition)
$p=7$: $7^2+2=51$ (not satisfying the condition)
so I would have a reason to believe that only the case $p=3$ will satisfy this condition, but how would I go about showing this rigorously?
 [/INST] If $3 \nmid p$, then $p \equiv \pm 1\pmod{3}$ and so $3 \mid (p^2+2)$, with $p^2+2>3$. So $p^2+2$ is prime can only hold for $p=3$. We note that both $3^2+2$ and $3^3+2$ are primes. $\blacksquare$
</s>