The sum of cubes of any three consecutive integers is divisible by $9$. i.e $(n^3 + (n+1)^3 + (n+2)^3)\mod9=0$ for every $n\in\mathbb{Z}$.
They say it is sufficient to check out for values of $n=0,1,2,3,...8$ due to properties of modular arithmetic. Why this is so ?
Thanks
This happens because of the following properties, which you can easily verify:
$$ (a + b) \mod c \equiv ((a \mod c) + (b \mod c)) \mod c \\ (a * b) \mod c \equiv ((a \mod c) * (b \mod c)) \mod c $$
This lets you rewrite your required condition as: $$((n \mod 9)^{3} + ((n \mod 9) + 1)^{3} + ((n \mod 9) + 2)^{3}) \mod 9 = 0$$ for all $n$, which makes it sufficient to check for $n = 0, 1, \dots, 8$.