# Proof: any prime number greater than 3 is congruent to 1 or 5 mod 6

1. Oct 23, 2005

### jhson114

I'm trying to prove that any prime number bigger than 3 is congruent to 1 or 5 modulo 6. I started out by saying that that is the same as saying all prime numbers bigger than 3 are in the form 6n +- 1, n is an integer since 1 or 5 mod 6 yields either 1 or -1 and if you divide 6n+-1 by 6, you also get 1 or -1. But not i have no idea how to continue. any help will be appreciated. thank you

2. Oct 23, 2005

### Tide

I think you are basically assuming what you set out to prove.

You may want to consider that if p > 3 is prime then both p-1 and p+1 are even (equivalent to 0 mod 2) and at least one of them equivalent to 1 or 2 mod 3. Does that lead anywhere?

3. Oct 23, 2005

### jhson114

Tide, by first assuming what you said (p>3 is prime then both p-1 and p+1 are even),

1. Assume p>3, p+-1 are even
2. P+-1 = 2n , n is an integer
3. p+-1 = 2n congruent to 0 mod 2
4. p+-1 = 2(3n) = 6n congruent to 0 mod 6
5. p = 6n +- 1
6. p = 6n -1 congruent to 5 mod 6
7. p = 6n +1 congruent to 1 mod 6

is this the correct way to do it? it seems like im not really proving anything here because you first assumed that p>3 P+-1 is even, but didnt prove that it is in fact even. and the part where i went from 2n to 6n seems incorrect. help please.

4. Oct 23, 2005

### Benny

Perhaps you could try looking at it the following way. I don't know if it is much help though.

$$a \equiv b\left( {\bmod 6} \right),b \in \left\{ {\mathop 0\limits^\_ ,\mathop 1\limits^\_ ,\mathop 2\limits^\_ ,\mathop 3\limits^\_ ,\mathop 4\limits^\_ ,\mathop 5\limits^\_ } \right\},a \in Z$$

You could then using the definition of a congruent to b modulo 6 and see if you can make some conclusions from that.

Edit: You only need to show that if an integer is a prime and it is greater than 3 then it is congruent to 1 or 5 mod 6. So I think it is sufficient to simply knock out the numbers which do not satisfy the divisibility criteria.

Last edited: Oct 23, 2005
5. Oct 23, 2005

### ivybond

Any given integer is congruent to 0, or 1, ..., or 5 modulo 6

Which integers can't be prime?

6. Oct 23, 2005

### jhson114

Using this formula:
$$a \equiv b\left( {\bmod 6} \right),b \in \left\{ {\mathop 0\limits^\_ ,\mathop 1\limits^\_ ,\mathop 2\limits^\_ ,\mathop 3\limits^\_ ,\mathop 4\limits^\_ ,\mathop 5\limits^\_ } \right\},a \in Z$$
which states that all whole numbers can be represented as either, 6n, 6n+1, 6n+2, 6n+3, 6n+4, or 6n+5, since 6n is a multiple of 6, 6n+2 and 6n+4 are multiples of 2, 6n+3 is a multiple of 3, this leaves 6n+1 and 6n+5 to be prime numbers. is this proof by exhausion or is it even a proof? can someone also tell me the name of the above formula?

Last edited: Oct 23, 2005
7. Oct 23, 2005

### Tide

jh,

Every prime number (except 2) is odd, otherwise it would be divisible by 2 and would not be prime! Therefore, p-1 and p+1 are both even.

Now, since p itself is odd and NOT divisible by 3, it must be equivalent to either 1 or 2 mod 3. We already know that p = 1 mod 2.

Here's one way to proceed (I'll let you fill in the gaps!)

From the above deductions, either (a) $p = 2m+1$ and $p = 3n+1$ or (b) $p = 2m+1$ and $p = 3n+2$ where m and n are integers.

In case (a), we have $2m+1 = 3n+1$ from which $2m=3n$. Therefore, m is a multiple of 3 and n is even! You must conclude that p is a mulitple of 6 PLUS 1!

Can you handle case (b)?

8. Oct 23, 2005

### ivybond

Righty-oh, jhson114!
You don't need to prove that some prime numbers are of 6n+1 and some of 6n+5 kind.
You've just proven that all prime numbers can be 6n+1 or 6n+5 ONLY.
QED

Last edited: Oct 23, 2005
9. Oct 23, 2005

### jhson114

for b, 2m +1 = 3n +2 => 2m = 3n+1. does this mean n is even and m is a multiple of 6 PLUS 1; therefore P must be... i dont know.. T.T I know what you did with a, but having that extra 1 totally confused me on how to go about after setting the two equations equal to each other.

10. Oct 23, 2005

### HallsofIvy

Staff Emeritus
That is a completely valid proof.