Prove that $(n^3 - 1)n^3(n^3 + 1)$ is divisible by $504$ How to prove that $(n^3 - 1)n^3(n^3 + 1)$ is divisible by $504$? Factoring $504$ yields $2^3 \cdot 3^2 \cdot 7$. Divisibility by $8$ can be easily seen, because if $n$ is even then $8 | n^3$, else $(n^3 - 1)$ and $(n^3 + 1)$ are both even and one of these is divisible by $4$ so $8|(n^3 - 1)(n^3 + 1)$. I'm stuck at proving divisibility by $9$ and $7$

$(n^3 - 1)n^3(n^3 + 1) =n^3(n^6 -1)$
Since $\phi(7)=\phi(9)=6$, we get that $7$ and $9$ always divide $n^3(n^6 -1)$, by Euler–Fermat.
