# 3, 5, 7 are the only three consecutive odd natural numbers that are prime. [duplicate]

This question already has an answer here:

Can someone please help me proof this theorem. So far I assumed towards contradiction that there exist three consecutive odd natural numbers that are primes P, P+2, and P+4.

Theorem: 3, 5, 7 are the only three consecutive odd natural numbers that are prime.

## marked as duplicate by Dietrich Burde abstract-algebra StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Sep 14 '17 at 8:27

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

• What are the remainders when you divide by $3$? – user296602 Sep 14 '17 at 5:31
• Minor point: The theorem is false as written, because $-7,-5,-3$ are three consecutive prime odd integers. Replace "integers" with "natural numbers", and the theorem becomes true. – vadim123 Sep 14 '17 at 5:50
• @vadim123 But you knew what he actually wanted to mean didn't you? – neonpokharkar Sep 14 '17 at 6:24

## 3 Answers

All odd primes, except for $3$, are of the form $6n \pm 1$.

So, if two odd primes bigger than $3$ exists and differ by $2$, they must be of the form

$6n-1, 6n+1$ for some integer $n$.

The number that are $2$ before and $2$ after will show up as

$6n-3, 6n-1, 6n+1, 6n+3$

If $n=1$, you get $3,5,7,9$ and the first three numbers are prime.

For any $n>1$, only the middle two numbers might be prime.

## A simpler proof.

Let $(x, x+2, x+4)$ be three consecutive odd numbers.

Modulo 3, those three numbers will have to look like one of

(0, 2, 1) or (1, 0, 2) or (2, 1, 0)

Hence at least one of them will be a multiple of three.

Since the number 3 is a prime number, we need to look at those cases where one of those three numbers is 3.

(-1, 1, 3) or (1, 3, 5) or (3, 5, 7)

So (3, 5, 7) is the only sequence of three consecutive odd prime numbers.

Let's get three numbers: $n, n+2, n+4$.

We have 2 cases:

1. $n\not\equiv0\mod 3$:

Thus $n=3k+1$ or $n=3k+2$, so $n+2=3(k+1)$ or $n+4 = 3(k+2)$

1. $n=3k$

In both cases at least one of our numbers is divisible by $3$.

The only prime that is divisible by $3$ is $3$.

The only sequention of prime numbers $n, n+2, n+4$ that contains $3$ is $3,5,7$.

So the only sequention of prime numbers $n, n+2, n+4$ is $3,5,7$.

Here $nk$ represents $10n +k$

We start by saying ,leaving 2 all prime numbers have odd units place , possible combinations for 3 consecutive prime numbers will be.

$$n1,n3,n5$$ $$n3,n5,n7$$ $$n5,n7,n9$$ $$n7,n9,(n+1)1$$ $$n9,(n+1)1,(n+1)3$$ As all the numbers $\gt 5$ with units place 5 are divisible by 5, so by eliminating cases with n5 we are left with,

$$n7,n9,(n+1)1$$ $$n9,(n+1)1,(n+1)3$$

Now if we see 3's table $$9,39,69,\cdots,(3n)9$$ Are divisible by 3,and $$21,51,81,\cdots,(3n+2)1$$ Are divisible by 3, $$27,57,87,\cdots,(3k+2)7$$ Are divisible by 3

So on our possible cases if $n=3k$

$$(3k)7,(3k)9,(3k+1)1$$ $$(3k)9,(3k+1)1,(3k+1)3$$ As $(3n)9$ is divisible by 3, $n\not= 3k$ for three consecutive prime numbers to exist.

For $n=3k +1$

$$(3k+1)7,(3k+1)9,(3k+2)1$$ $$(3k+1)9,(3k+2)1,(3k+2)3$$ As (3k+2)1 is divisible by 3, $$n\not= 3k+1$$ for three consecutive prime no to exist

For $n=3k+2$

$$(3k+2)7,(3k+2)9,(3(k+1))1$$ $$(3k+2)9,(3(k+1))1,(3(k+1))3$$ As (3k+2)7 is divisible by 3 , $$n\not= 3k+2$$for three consecutive prime numbers.

We all cases are disapproved we thus say there are no three consecutive prime numbers $\gt 5$.