# The sum of three cubes

I'm reading an article about numbers that can be expressed as the sum of three cubes: http://www.ams.org/journals/mcom/2007-76-259/S0025-5718-07-01947-3/S0025-5718-07-01947-3.pdf

It states in the article that if you take the following expressions for $x^3+y^3+z^3 = k$ for $x,y,z,k \in \mathbb{N}$ then $k$ is not equal to 4 modulo 9.

1. It states that a cube modulo 9 always equals 0, -1 or 1. How can you prove this?
2. Given that this is true, $k \neq 9n \pm 4$ for any integer $n$. I understand how they get to 4, but shouldn't five also be impossible? I get to get 3 modulo 9 you would need 3 cubes that are each 1 modulo nine. For six you would need three cubes of each -1 modulo 9. But how would you reach 5 modulo 9 as the sum of three cubes?

Yes, I am aware another question is about this (If $n\equiv 4 \pmod 9$ then $n$ cannot be written as sum of three cubes?) but this doesn't answer why 5 is possible and why a cube is $0, \pm 1\mod 9$.

• If $x$ is divisible by three, then $x^3\equiv 0\pmod 9$ If $x$ is not divisible by $3$ then $x^6\equiv 1\pmod 9$ which means that $(x^3-1)(x^3+1)$ is divisible by $9$. Both terms can't be divisible by $3$ so one of $x^3-1,x^3+1$ must be divisible by $9$. Nov 10 '15 at 21:36
• $5$ is not possible. $5\equiv -4\pmod 9$. That's why there's a $-$ in the $\pm.$ Nov 10 '15 at 21:37
• What you need to know in order to answer your question is the Hasse Principal. To find out about it, you can go here $\longrightarrow$ m.youtube.com/watch?v=d6nUVa8EtlU Oct 27 '17 at 8:50

1. Every integer value $x$ is either $3k-1$, $3k$, or $3k+1$ for some integer $k$. If you cube those, you get $27k^3-27k^2+9k-1$, $27k^3$, or $27k^3+27k^2+9k+1$. Each of those is clearly either $-1$, $0$, or $+1$ modulo $9$.
2. $9k+5 = 9j-4$ for $j = k+1$, and $9k-5 = 9j+4$ for $j = k-1$. So the $\pm 5$ cases are subsumed by the $\pm 4$ cases.