2
$\begingroup$

I'm trying to figure out how to prove that if $p$ and $p^2+2$ are prime numbers then $p^3+2$ is a prime number too. Can someone help me please?

$\endgroup$
7
  • 2
    $\begingroup$ The trick is that $p$ and $p^2 + 2$ are almost never both prime. Have you tried some examples? $\endgroup$ Oct 6, 2015 at 7:01
  • $\begingroup$ Hint: Find what is $p\mod3.$ $\endgroup$
    – CIJ
    Oct 6, 2015 at 7:02
  • $\begingroup$ @QiaochuYuan what about 3, 3 is prime and 11 is prime and 29 is prime ! $\endgroup$
    – Nizar
    Oct 6, 2015 at 7:04
  • $\begingroup$ Prime numbers greater than $3$ are always $\pm1\bmod 6$. So $p^2+2\equiv 3\bmod 6$, and hence a multiple of $3$ (meaning not prime). $\endgroup$
    – gebruiker
    Oct 6, 2015 at 7:08
  • 1
    $\begingroup$ @Nizar: I said "almost never," not "never." $\endgroup$ Oct 6, 2015 at 7:10

2 Answers 2

9
$\begingroup$

If $p=2$, then $p^2+2$ is not prime.

If $p=3$, then $p^2+2 = 11$, then $p^3+2=29$ is prime.

If $p>3$, then $p \equiv \pm 1 \pmod 3$, then $p^2+2 \equiv 0 \pmod 3$. So, $p^2+2$ is not prime.

$\endgroup$
4
  • $\begingroup$ For clarity you might want to add that the statement given by the OP is thus true... $\endgroup$
    – gebruiker
    Oct 6, 2015 at 7:13
  • $\begingroup$ So it works only for 3? $\endgroup$
    – Ergo
    Oct 6, 2015 at 7:25
  • 2
    $\begingroup$ Why do you bother to isolate the case $p = 2$ -- the logic holds for the same reason in the $p > 3$ case. $\endgroup$
    – MT_
    Oct 6, 2015 at 7:47
  • $\begingroup$ Sure, you're right. Thank you very much guys, I understood. $\endgroup$
    – Ergo
    Oct 6, 2015 at 9:03
1
$\begingroup$

You can use the difference of squares formula to get that $p^2 + 2 = (p+1)(p-1) + 3$. Since $p^2$ is prime, $(p+1)(p-1)$ cannot have a factor $3$ as it would imply that $p^2 + 2$ is divisible by $3$ hence not a square. Among three consecutive integers one has to be divisible by $3$. Since neither $p+1$ or $p-1$ is divisible by $3$, $p$ must be. $p$ is a prime number and the only prime divisble by $3$ is $3$ itself, hence $p =3$ and $p^3 + 2 = 29$, a prime.

$\endgroup$
1
  • $\begingroup$ Welcome to Math Stack Exchange. Your answer may be easier to read and more likely to be voted on if you edit your post using this tutorial to make it easier to read. $\endgroup$
    – jwc845
    Nov 24, 2019 at 18:05

Not the answer you're looking for? Browse other questions tagged .