Helo guys!

I have doubts on this question:

"If $p= n^{2} + 2 $ is a prime number, prove that n is a multiple of 3."

I did the test with n=3k (multiple of 3), n=3k+1 and n=3k+2, ($k \in R $)and I tried to show that in the last two cases $p$ was not a prime number and I got to this:

- $p1=(3k+1)^{2} +2 = 9k^{2} + 6k +3 $
- $p2=(3k+2)^{2} +2 = 9k^{2} + 12k +6 $

Why aren't p1 and p2 prime numbers? I can not understand it.

Thanks.