Use the division algorithm to establish that, The cube of any integer is either of the form $9k ,9k + 1, 9k + 8$. 
Use the division algorithm to establish that, The cube of any integer is either of the form $9k ,9k + 1, 9k + 8$.

Let $a$ is an integer, write $a = 9k + r, 0 \le r < 9$  hence $r = \{0,1,2,3,4,5,6,7,8\}$ then $$a^3 =(9k + r)^3 = 9(9k^3 + 3kr(9k +r )) + r^3, 0 \le r³ < 9$$
when $r=0 \to r^3 = 0$
when $r=1 \to r^3 = 1$
when $r=2 \to r^3 = 8$
when $r=3 \to r^3 = 27$
Since $0\le r^3 < 9$ above $8$ values cannot be accepted.  Hence $r^3\in{0,1,8}$. Hence $a^3$ can express in $a^3 = 9k, a^3 = 9k + 1, a^3 = 9k + 8$ forms. Therefore cube of any integer is form $9k, 9k + 1,$ or $9k + 8$.
Is this correct? Are there other solutions?

*

*$a=3n\Longrightarrow a^3=(3n)^3=9\cdot(3n^3)\equiv0\pmod 9$

*$a=3n+1\Longrightarrow a^3=(3n)^3+3(3n)^2+3(3n)+1=9\cdot(3n^3+3n^2+n)+1\equiv1\pmod9$

*$a=3n+2\Longrightarrow a^3=(3n)^3+6(3n)^2+12(3n)+8=9\cdot(3n^3+6n^2+4n)+8\equiv8\pmod9$
