# cubic number in the form $9k+b$

how could i prove that a cubic number $u^3$ is always of the form $9k+n$ where $n=0,1,2,3,4,\ldots,8$

can a similar proof be made to prove that a power of n $n^k$ is of the form

$am+b$ where k,m,a,b,u and n are integers $a=a(m)$ and $b=0,1,2,3,\ldots,a-1$

what congruence should i solve ? apparently i should study the congruence

$u^3=b \pmod 9$ but i have no idea how to solve this.

-
What about $27 = 3^3$? – Lord_Farin Oct 13 '12 at 22:15
$27=9*3$ yes i forgot the case $n=0$ – Jose Garcia Oct 13 '12 at 22:16

Every integer has form $\rm\: 9\,q+r\:$ with remainder $\rm\:0\le r< 9\:$ by the division algorithm.
Less trivially, one may show that cubes are either $\,0\,$ or $\,\pm1\!\pmod 9$.
$\rm {\bf Hint}\ \ \ mod\ 9\!:\ (j + 3k)^3 =\, j^3\! + 9(\cdots)\,\equiv\, j^3\in \{0,1,2\}^3 \equiv \{0,1,-1\}$