The question goes as follows:
Prove that for any prime $p\geq 5$, $p^2-1$ will be divisible by $12$.
I think I have a solution but I just wanted to double check with you guys.
My attempt:
If $p$ is a prime greater than $5$ we know $p$ must be odd. Thus it must be the case that both $(p-1)$ and $(p+1)$ are even. Since $p^2-1=(p-1)(p+1)$ we can see that $p^2-1$ must be divisible by 4.
Further, if $p$ is prime it cannot be divisible by $3$, but since $(p-1), p, (p+1)$ are consecutive, it must be the case that either $(p-1)$ or $(p+1)$ is divisible by 3.
Therefore $p^2-1$ is divisible by $3$ and $4$ and hence $12$.
Is this correct logic? And is there a better way? Thanks!