Show that $2018^{6k+2}$ can't be written as $a^3+b^3+c^3$, where $a,b,c\in \mathbb {N} $. Show that $2018^{6k+2}$ can't be written as $a^3+b^3+c^3$, where $a,b,c\in \mathbb {N} $.
I tried to prove that this is not possible by congruences modulo 3, 5, 11, 13, 17 but it doesn't work.
 A: Interestingly, the following identity holds : $x^3 \equiv (x-3)^{3} \mod 9$. This can be checked by factorizing $x^3 - (x-3)^3$ using the difference of cubes formula, and then removing a pair of $3$s coming out as factors.
(What is interesting about the above formula is that you can only generally say that $x^n - (x-3)^n$ is  a multiple of $3$ from the fact that $x - (x-3)$ is a multiple of $3$, but here the cubic binomial coefficients $1,3,3,1$ bear a pattern that allows a stronger relation to hold for $9$).
Now, from here one checks that modulo $9$, a cube can only be one of $0,1$ or $-1$, since these are the values of $0^3,1^3,2^3$ modulo $9$.
Now, from here, the sum of three cubes can be $x$ mod $9$, where $x = \pm a \pm b \pm c$, with $a,b,c \in \{0,1\}$. This clearly indicates that $x \neq \pm 4$.
In  other words, any number that is of the form $9n \pm 4$ cannot be written as the sum of three cubes.
Can you conclude now? (Hint : use modular arithmetic to show that $2018^{6k+2} \equiv 4 \mod 9$ for all $k \geq 0$). 
A: Since $$(3n)^3=27n^3,$$
$$(3n+1)^3=27n^3+27n^2+9n+1$$ and
$$(3n-1)^3=27n^3-27n^2+9n-1,$$ we obtain:
$$x^3\equiv1,-1,0(\mod9),$$ which says
$$a^3+b^3+c^3\equiv3,-3,2,-2,0,1,-1(\mod9).$$
But $$2018^{6k+2}\equiv 4\cdot2^{6k}\equiv4.$$
