Prove that $p^4 - 1$ is divisible by by $120$. How to prove that $p^4-1$ is divisible by $120$ if $p>5$? I've tried to present $p^4-1$ as multiplication of squares.
 A: Let's first tackle a problem I claim is related: showing $24 | p^2 - 1$ for $p > 5$. Since $p$ must be odd, we know that both $p-1$ and $p+1$ are even; because they are consecutive even numbers, one must in fact be divisible by $4$. Therefore $8 | (p-1)(p+1)$. Now, since $p > 5$, $p$ isn't divisible by $3$, so therefore since one of the three consecutive numbers $p-1, p, p+1$ must be, we can conclude either $3 | (p-1)$ or $3 | (p+1)$. Thus $3|(p-1)(p+1)$, and since we also have $8 | (p-1)(p+1)$ we therefore have $24 | (p-1)(p+1)$. (Why?)
So $24 | p^2 - 1$ for $p > 5$, and since $p^4 - 1 = (p^2 - 1)(p^2+1)$ we know $24 | p^4 - 1$. So all we have left to do is show that $5 | p^4 - 1$. I'll leave this to you....
A: Hint:
$120=3\cdot5\cdot8$
Now by Fermat's little theorem $3|(p^{3-1}-1)$ and $p^2-1$ divides $(p^2)^2-1$
and $5|(p^{5-1}-1)$
and as $p$ is odd, let $p=2m+1, p^2=(2m+1)^2=8\cdot\dfrac{m(m+1)}2+1\equiv1\pmod8$
A: Hint:
For any integer $p=6m\pm1,$
$(6m\pm1)^2=36m^2\pm12m+1\equiv24m^2+24\cdot\dfrac{m(m\pm1)}2+1\equiv1\pmod{24}$
Again $p(p^4-1)$
$=p(p^2-1)(p^2+1)=p(p^2-1)(p^2-4+5)$
$=\underbrace{p(p^2-1)(p^2-4)}_{\text{product of five consecutive integers, one of them must be divisible by }5}+5p(p^2-1)$
So, $5|p(p^4-1)\implies5|(p^4-1)$ if $5\nmid p\iff(p,5)=1$
So, we don't need $p$ to be prime, but it is sufficient that $(p,2\cdot3\cdot5)=1$
