Let n be a natural number. If 3 does not divide (n2 +2), then n is not a prime number or n = 3.
In plain text, it is customary to write n^2 for n^{2}.
This seems true. If 3 does not divide n^2 + 2, then n^2 + 2 = 3k + 1 or n^2 + 2 = 3k + 2 for some k. In the latter case, n is divisible by 3. Suppose that n^2 = 3k - 1 and, towards contradiction, assume that n is prime. Then n = 6m + 1 or n = 6m - 1 for some integer m as described here. Try to derive a contradiction.
Maybe there is an easier proof...
Let $\displaystyle n=p$, where $\displaystyle p$ is a prime number greater than $\displaystyle 3$ , then :
$\displaystyle p \equiv 1 \pmod 3 ~\text{or}~p\equiv 2 \pmod 3$
Hence :
$\displaystyle p^2 \equiv 1 \pmod 3 \Rightarrow p^2+2 \equiv 0 \pmod 3$
Contradiction .