Prove that $n^3+2$ is not divisible by $9$ for any integer $n$ How to prove that $n^3+2$ is not divisible by $9$?

The cubes modulo $9$ are $0$, $1$ and $8$; now
$$
0+2\equiv2,\quad 1+2\equiv3,\quad 8+2\equiv1\pmod{3}
$$
Computations are easy, because $(n+3)^3=n^3+9n^2+27n+27\equiv n^3\pmod{3}$, so we just need to do $0^3$, $1^3$ and $2^3$.
