[Math] Prove by mathematical induction for any prime number$ p > 3, p^2 – 1$ is divisible by $3$

elementary-number-theoryprime numbers

Prove by mathematical induction for any prime number $p > 3, p^2 – 1$ is divisible by $3$?

Actually the above expression is divisible by $3,4,6,8,12$ and $24$.

I have proved the divisibility by $4$ like:
$$
\begin{align}
p^2 -1 &= (p+1)(p-1)\\
&=(2n +1 +1)(2n + 1 – 1)\;\;\;\text{as $p$ is prime, it can be written as $(2n + 1)$}\\
&= (2n + 2)(2n)\\
&= 4(n)(n + 1)
\end{align}
$$
Hence $p^2 – 1$ is divisible by 4.

But I cannot prove the divisibility by $3$.

Best Answer

Hint:

$p \equiv 1$ or $-1 (\mod3) \implies p^2 \equiv 1 (\mod 3)$ for every $p>3$