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

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

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.

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.

Using this formula:
[tex]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[/tex]
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?

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.

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

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.

Using this formula:
[tex]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[/tex]
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?