TITLE: The cube of any number not a multiple of $7$, will equal one more or one less than a multiple of $7$
QUESTION [11 upvotes]: Yeah so I'm kind of stuck on this problem, and I have two questions.


Is there a way to define a number mathematically so that it cannot be a multiple of $7$? I know $7k+1,\ 7k+2,\ 7k+3,\ \cdots$, but that will take ages to prove for each case.

Is this a proof? $$(7k + a)^3 \equiv (0\cdot k + a)^3 \equiv a^3 \bmod 7$$



Thank you.

REPLY [5 votes]: Say $a$ is a number not a multiple of $7$.
Then we have that $$a \equiv \pm 1 ,\pm 2,\pm 3 \pmod7 $$
$$\implies a^3 \equiv (\pm 1)^3 ,(\pm 2)^3,(\pm 3)^3\equiv \pm 1 ,\pm 8,\pm 27 \pmod7 $$
$$\implies a^3 \equiv \pm 1 \pmod7 $$
Hope this is the shortest proof possible.