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$

Hints


*

*For $7$, what are the possible values of $n^3 \pmod 7$? (It suffices to check $-3, \ldots 3$.)

*For $9$, what are the values of $n^3 - 1, n^3, n^3 + 1 \pmod 9$? For example, for $n = 4 \pmod 9$ we have $n^3 - 1 = 0 \pmod 9$, so the given product is also divisible by $9$.

