0

Prove that if $p$ and $p+2$ are both prime integers greater than $3$, then $6$ is a factor of $p+1$.

Computing a few primes greater than $3$ modulo $6$ shows the following pattern $5,1,5,\dots$

Thus $$\begin{cases}p\equiv1,5 \pmod{6} \\ p+2 \equiv3,7 \equiv3,1 \pmod{6}\end{cases}$$

Also $p+1 \equiv 2,6 \equiv2,0 \pmod{6}$. I'm not sure how to continue from here... I would like to use modular arithmetic to show this. Is it necessary to remember that every prime can be written as $6n+1$ or $6n+5$ here?

  • 2
    Hint: every prime greater than $3$ is either of the form $6k-1$ or $6k+1$. – lulu Oct 25 '20 at 15:27
  • 1
    Hint: in any group of three consecutive integers, one is a multiple of $3$, which one is it in the case of $p, p + 1$ and $p + 2$? – Rob Arthan Oct 25 '20 at 15:28
  • 1
    "Is it necessary to remember that every prime can be written as 6n+1 or 6n+5 here" Sufficient, but not necessary. I find it much more fundamental to remember $6=2\cdot 3$ so $6|p+1$ if and only if both $2$ and $3$ divide $p+1$. Which as $2$ and $3$ don't divide $p$ or $p+2$ is fairly simple to prove – fleablood Oct 25 '20 at 15:42
  • I wonder which kind of answer is expected because the modular arithmetic approach has more or less already been posted by the author. – Peter Oct 25 '20 at 15:52
  • 1
    @Peter I was looking for the one with modular arithmetic. To be exact dealing with $\mod 6$ instead of $2$ and $3$ separately, but all the answers received are great. –  Oct 25 '20 at 15:54
  • OK, that's the main thing that we could help you. – Peter Oct 25 '20 at 15:59
  • Well, $\mod 6$: If $p+1\equiv 0,1,2,3,4,5,$ then $p\equiv 5,0,1,2,3,4$ but $p$ is prime so $0,2,3,4$ are out (else $p$ is divisible by $6,2,3,2$) and $p+2\equiv 1,2,3,4,5,0$but as $p+2$ is prime, $2,3,4,0$ are out (else $p+2$ is divisible by $2,3,2,6$). so $p+1\equiv 0$ and $p\equiv 5$ and $p +2\equiv 1$ is the only option. – fleablood Oct 25 '20 at 16:00

5 Answers5

3
  1. Prove that $3\mid p+1$:

Note that $p, p+1, p+2$ are consecutive integers so one of them is divisible by $3$. Since $p$ and $p+2$ are primes greater than $3$, we know that $3\nmid p$ and $3\nmid p+2$. That is, $3\mid p+1$.

  1. Prove that $2\mid p+1$:

Note that $p$ and $p+2$ should be odd since they are primes greater than $3$. Therefore it is trivial that $p+1$ is even.

Conclusion :

From 1. and 2. and the fact that $\gcd(2, 3)=1$, we have that $3\times2=\color{blue}{6\mid p+1}$ as desired.

2

It's equivalent to show that $2$ and $3$ are factors of $p+1$. Since $p$ and $p+2$ are prime integers and greater than $3$, they are both odd. So $p+1$ must be even. So $2 \mid p+1$. Also, $3 \mid p$ or $3 \mid p+1$ or $3 \mid p+2$. But $p > 3$ and $p$ and $p+2$ are primes so $3 \mid p+1$. This shows that $2 \mid p+1$ and $3 \mid p+1$ so $6 \mid p+1$ (by prime factorization).

Michelle
  • 1,784
  • 7
  • 20
0

You can demonstrate a factor for each of the residues $\bmod 6$ than $1,5$. Then $p$ must be the $5$

Ross Millikan
  • 374,822
0

If $p+2\equiv3\pmod6$, then $3|p+2$, so, if also $p>3$, then $p+2$ is not prime.

Can you continue from here?

J. W. Tanner
  • 60,406
0

Thing is if $p$ and $p + 2$ are both primes greater than $3$ then neither $2$ nor $3$ divdide either of them. And so you have to prove that $2$ and $3$ must both divide $p+1$.

$2\not\mid p \implies p\not \equiv 0\pmod 2$ but we can only have either $p \equiv 0\pmod 2$ or $p \equiv 1 \pmod 2$. As one is impossible the other must be true. So $p \equiv 1 \pmod 0$. Therefore $p + 1 \equiv 1+1 \equiv 2 \equiv 0 \pmod 7 \implies 2\mid p+1$.

(In other words, if $p$ is prime larger than two it is odd so $p + 1$ is even. But this explains why such basic intuitive logic of "if $n$ is odd then $n+1$ is even" is actually valid.)

Sam thing for $3$. $p$ is prime so $3\not \mid p$ so $p\not \equiv 0 \pmod 3$. But $p\equiv 0,1,2\pmod 3$ are the only three options. So either $p\equiv 1 \pmod 3$ or $p\equiv 2\pmod 3$. But if $p \equiv 1\pmod 3$ then $p+2 \equiv 1+2\equiv 3\equiv 0\pmod 3$. But we were told $p+2$ was prime too. So $p\equiv 1 \pmod 3$ is a contradiction. So that leaves $p\equiv 2\pmod 3$ is the only option. So $p+1 \equiv 3\equiv 0\pmod 3$ and $3|p+1$.

So $2|p+1$ and $3|p+1$ so $6|p+1$.

=====

Is it necessary to remember that every prime can be written as 6n+1 or 6n+5 here?

Well you could.

If $p=6n+5$ then $p+1 = 6n+6=6(n+1)$. And if $p=6n+1$ then $p+2 = 6n+3 \ne 6n \pm 1$ so that's impossible. We must have $p=6n+5$ and $p+n = 6n+7 = 6(n+1) + 1$. And therefore $p+1 = 6(n+1)$.

....

But I think it's more fundamental to think $6=2\cdot 3$ so proving divisibility (or lack thereof) by $6$ is to prove divisiblity by $2$ and $3$.

I completely forgot and would never remember that primes must be of the form $6n+ 1, 5$ unless I realize a prime must be of the case $kn \pm w$ so that $w\le \frac k2$ is relatively prime to $k$. For $k=6$ we only have $w=1$ for $\gcd(w,6)=1$ as $2,3|6$. So if $p$ is rime it must be $6n\pm 1$.

fleablood
  • 124,253
  • Great answer! I was trying to go directly for modulo $6$. For $p+2 \equiv 3,1 \pmod{6}$ I seem to be able to find a contradiction for the case where the remainder is $3$ by parity since I get that then $p$ would be even. Could I use this directly and conclude that since $p+2 \equiv 1 \pmod{6} \Rightarrow p+1 \equiv 0 \pmod{6}$? –  Oct 25 '20 at 15:58