Let $x$ be a positive integer and $y = x^2 + 2$. Can $x$ and $y$ be both prime? The answer is yes, since for $x = 3$ we get $y = 11$, and both numbers are prime. Prove that this is the only value of x for which both x and y are prime.
I have to somehow prove this is true, and the only hint we were given is that we should consider cases depending on the remainder of $x$ modulo $3$. Does anyone have any tips on how to start proving this is true?
If $x\equiv 0\mod 3$, then it is obvious that for $x$ to be prime, $x$ must be $3$.
Now, take a look at what happens if $x\equiv 1 \mod 3$. What is the value of $x^2+2 \mod 3$? What about if $x\equiv 2\mod 3$?