I'm a little out of practice when it comes to modular arithmetic, so this problem is giving me some trouble. I need to show that for every integer n, (n^3) mod 6 = n mod 6.
Note, the we can factor 6 as 2 times 3.
Where 2 and 3 are relatively prime.
Thus, it is equivalent to saying the system of congruences is satisfied:
The first congruence is true because consider cases when is even or odd. It is true in both of them.
The second congruence is true by Fermat's little theorem.