The question is in the title and my try comes here:
Let $n\in\mathbb{Z}$, then we have to look at $$ (n-1)^3+n^3+(n+1)^3=3n(n^2+2) $$ so if we can show that $n(n^2+2)$ is divisible by $3$ we are done. So I divide it up into three cases
$n\equiv 0 \ (\mathrm{mod} \ 3)$ means we are done.
$n\equiv 1 \ (\mathrm{mod} \ 3)$, then $n^2\equiv 1 \ (\mathrm{mod} \ 3)$ and then $3\mid(n^2+2)$ and we are done.
$n\equiv 2 \ (\mathrm{mod} \ 3)$, then $n^2\equiv 1 \ (\mathrm{mod} \ 3)$ and then again $3\mid(n^2+2)$ and in this case too we get the desired result.
First of all, is this correct? And secondly if it is correct, is there a more elegant way of showing this result?
Thank you!