Prove that a perfect cube is a multiple of $9$ or differs from a multiple of $9$ by $1$?

3.6k Views Asked by At

I had this question in my discrete mathematics class today. I can see that if you use proof by cases, you could prove this using $9$ separate cases where one case involves multiples of $9$ and then cases that involve remainders from $1$ to $8$. My professor said that you can also solve this using only $3$ cases, however, but I don't see how?

1

There are 1 best solutions below

0
On

We prove it for $3a,3a+1,3a+2$ for an integer $a$ since this represents all cases.
$(3a)^3\equiv0\pmod{9}.$
$(3a+1)^3=27a^3+27a^2+9a+1\equiv1\pmod9.$
$(3a+2)^3=27a^3+54a^2+36a+8\equiv-1\pmod9.$
Since all of these are within $1$ of a multiple of $9,$ we are done.
Inspiration: $(a+b)^3=a^3+3a^2b+3ab^2+b^3$ so we can cancel a lot of terms if $a=3k$ for an integer $k.$