The sum of three cubes

Solution 1:

  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.