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?