# Showing $12\mid(p^{2}-1) \space \forall$ primes $p>3$

Claim: $$12\mid(p^{2}-1) \space \forall\text{ primes }p>3$$

Attempt at proof:

$$p>3\space\Rightarrow\space p\text{ is odd}$$ $$p^2-1=(p-1)(p+1)\space\Rightarrow2^2\mid(p^{2}-1)$$

How do I go on to show that $3\mid(p^2-1)$ which would complete the proof?

-
As 3 doesn't divide $p$, it has to divide either $(p-1)$ or $(p+1)$ –  Stefan Nov 6 '12 at 16:30
+1 for showing your work and showing effort! –  amWhy Nov 6 '12 at 17:10

We know, $3\mid p(p-1)(p+1)\implies 3\mid (p-1)(p+1)$ as $p>3$

As $p$ is odd$=2a+1$(say), $p^2-1=(2a+1)^2=8\frac{a(a+1)}2+1-1\implies 8\mid (p^2-1)$

So, $lcm(3,8)\mid (p^2-1)\implies 24\mid (p^2-1)$

We know, any prime$>3,$ can be written as $6r\pm1$ where $r$ is a positive integer.

So, $p^2-1=(6r\pm 1)^2-1=36r^2\pm 12r=24r^2+24\frac{r(r\pm1)}2\implies 24\mid (p^2-1)$

Observe that, this will be true for any number of the form $6r\pm1$, not necessarily prime.

-
the second part is very helpful, thanks! –  Dexter Nov 6 '12 at 16:45
@Dexter, my pleasure. –  lab bhattacharjee Nov 6 '12 at 17:04