Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to prove that if $p$ and $p+2$ are twin primes, $p>3$, then $6\ |\ (p+1)$. I figure that any prime number greater than 3 is odd, and therefore $p+1$ is definitely even, therefore $2\ |\ (p+1)$. And if I can somehow prove $3\ |\ (p+1)$, then I would be done. But I'm not sure how to do that. Help!

share|cite|improve this question
Exploit the fact that we can write any prime $p\gt3$ as $p=6n\pm1$. – Workaholic Mar 16 at 16:53

The easy way.

Note that one of $p,p+1,p+2$ must be divisible by $3$, since they are three consecutive numbers, and since $p$ and $p+2$ are prime, that must be $p+1$. We can do the same to show that $p+1$ is divisible by $2$.

Looking modulo $6$.

We can look $\mod 6$. We see that \begin{align} 6k+0\equiv 0\mod 6&\Rightarrow 6|6k+0\\ 6k+1\equiv 1\mod 6&\Rightarrow \text{possibly prime}\\ 6k+2\equiv 2\mod 6&\Rightarrow 2|6k+2\\ 6k+3\equiv 3\mod 6&\Rightarrow 3|6k+3\\ 6k+4\equiv 4\mod 6&\Rightarrow 2|6k+4\\ 6k+5\equiv 5\mod 6&\Rightarrow \text{possibly prime}\\ \end{align}

So for a number to be prime it must be either of the form $6k+1$ or $6k-1$ (equivalent to $6k+5$ since $6k-1=6(k-1)+5$). So if you have two primes, $p$ and $p+2$, then $p=6k-1$ and $p+2=6k+1$ for some $k$; thus, $p+1=6k$ is a multiple of $6$.

share|cite|improve this answer
i like this answer. It uses $6$ rather than $3$ and ignores that we have $2$ taken care of already by a different argument. However, I might be misunderstanding something when you write $2|6k + 0$ in the third line. Don't you mean $2|6k + 2$? Similarly for the next two lines where $3$ and $4$ are the remainders.. – Frank Hubeny Mar 16 at 12:52
@FrankHubeny, yes, thank you. That was a result of some not-reading-my-copy-paste-work thourough enough. – vrugtehagel Mar 16 at 12:55

If $p = 3k+1$ then $p+2$ is not prime.So $p=3k+2$ and you are done.

share|cite|improve this answer

Note that for every integer $k$, exactly one of $k,k+1$ is divisible by $2$ and exactly one of $k,k+1,k+2$ is divisible by $3$. What do your hypothesis tell you if you put $k=p$?

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.