0

Prove that for every integer $n$ , $n^3=n \text{ mod }6$

I was having no clue how to do this, then I thought of case-by-case analysis and obviously it worked. The problem is that there were six case and together they are long.

Is there any shorter method of proving this. Kindly provide some hints.

Singh
  • 2,108

5 Answers5

4

Factorize $n^3-n$. Is any of these factors even? Is any of these factors a multiple of three?

ajotatxe
  • 65,084
3

$n^3-n=n(n+1)(n-1)$ is always divisible by 2 and 3, so it is 0 mod 6.

Note: I marked this answer community wiki because I got the answer form the comment.

wythagoras
  • 25,026
1

The direct approach:

$$0^3 \equiv 0 \mod 6$$ $$1^3 \equiv 1 \mod 6$$ $$2^3 \equiv 8 \equiv 2 \mod 6$$ $$3^3 \equiv 27 \equiv 3 \mod 6$$ $$4^3 \equiv (-2)^3 \equiv -8 \equiv -2 \equiv 4 \mod 6$$ $$5^3 \equiv (-1)^3 \equiv -1 \equiv 5 \mod 6$$

Thus $$n^3 \equiv n \mod 6$$ by exhaustive checking.

Joel
  • 16,256
0

If you want to use purely modular arithmetic, then you must prove that both 3 and 2 divide your function. So, we use Fermat's little theorem.

Clearly, $n^3 \equiv n (\bmod 3) \implies n^3 - n \equiv 0 (\bmod 3)$

So, 3 divides this.

Now we move on to 2, with Fermat's little theorem again,

$n^2 \equiv n (\bmod 2) \implies n^3 \equiv n^2 \equiv n (\bmod 2)$, or, through transitivity, $n^3 - n \equiv 0 (\bmod 2)$. Thus, 2 and 3 divide this function, which immediately implies that 6 must also divide it, ie $n^3 - n \equiv 0 (\bmod 6)$.

Rellek
  • 2,222
0

Carmichael's function $\lambda(6)=\text{lcm}(\phi(3), \phi(2)) = 2$, and $6$ is square-free, so $n^{k\lambda(6)+c} \equiv n^c \bmod 6 \: (c>0)$ . And in particular, $n^3\equiv n\mod 6$.

In the same way, $n^{13} \equiv n \bmod 910$.

Joffan
  • 39,627