<s>[INST] Divisibility of 9 and $(n-1)^3 + n^3 + (n+1)^3$ Question: Show that for all natural numbers $n$ which greater than or equal to 1, then 9 divides $(n-1)^3+n^3+(n+1)^3$.
Hence, $(n-1)^3+n^3+(n+1)^3 = 3n^3+6n$, then $9c = 3n^3+6n$, then $c=(n^3+2n)/3$.
Therefore $c$ should be integers, but I don't know how to do it at next step ?
 [/INST] You want to show that $$(n-1)^3+n^3+(n+1)^3 \equiv 0 \pmod 9.$$ There are $9$ cases to check,


*

*$(0-1)^3+0^3+(0+1)^3 \equiv -1+0+1 \equiv 0 \pmod 9$

*$(1-1)^3+1^3+(1+1)^3 \equiv +0+1-1 \equiv 0 \pmod 9$

*$(2-1)^3+2^3+(2+1)^3 \equiv +1-1+0 \equiv 0 \pmod 9$

*$(3-1)^3+3^3+(3+1)^3 \equiv -1+0+1 \equiv 0 \pmod 9$

*$(4-1)^3+4^3+(4+1)^3 \equiv +0+1-1 \equiv 0 \pmod 9$

*$(5-1)^3+5^3+(5+1)^3 \equiv +1-1+0 \equiv 0 \pmod 9$

*$(6-1)^3+6^3+(6+1)^3 \equiv -1+0+1 \equiv 0 \pmod 9$

*$(7-1)^3+7^3+(7+1)^3 \equiv +0+1-1 \equiv 0 \pmod 9$

*$(8-1)^3+8^3+(8+1)^3 \equiv +1-1+0 \equiv 0 \pmod 9$

</s>