# Thread: Prime number and congruence modulo24

1. ## Prime number and congruence modulo24

n is a prime number.
Prove :
$\begin{array}{l}
\forall n \in {\rm N}:n \ge 5 \\
n^2 - 1 \equiv 0\left[ {\bmod 24} \right] \\
\end{array}$

2. Since $n$ is odd we have that $n-1$ and $n+1$ are consecutive-evem numbers -they differ in 2-, so one of them must be divisible by at 2 -and not 4- and the other divisible by at least 4, thus, since $n^2-1=(n-1)(n+1)$ , we must have that $n^2-1$ is a multiple of 8.

On the other hand, since 3 doesn't divide $n$ - because n is a prime greater than 4 - either $n=3k+1$ or $3k-1$ for some k in $\mathbb{Z}$ thus $3|(n-1)$ or $3|(n+1)$ hence $3|(n^2-1)$

Now, since 3 and 8 divide $n^2-1$ , and 3 and 8 are coprime, then $(3\cdot 8)|(n^2-1)$ i.e. $24|(n^2-1)$