[This is not a duplicate, since I am seeking for an alternative proof for this problem]
This is a problem from Proofs and Fundamentals, by Ethan D. Bloch.
Show that, for all $n \in \mathbb{Z}$, $n^{3} \equiv n$ (mod $6$).
I wrote my proof as follows and I would really appreciate if you could check it:
Proof: Let $n \in \mathbb{Z}$. Note that $n^{3} - n = (n-1) \cdot n \cdot (n+1)$, so the former is the product of three consecutive integers. By the Division Algorithm, we know that $n = 3q + r$, with $q,r \in \mathbb{Z}$ and $r \in \{0,1,2\}$. Since we have three consecutive integers, we know that each is either equal to $3k$, or $3k + 1$, or $3k + 2$ for some $k \in \mathbb{Z}$.
Let’s suppose that $n = 3k$ for some $k \in \mathbb{Z}$ (the argument is similar for the rest two cases, so for the sake of briefness I will omit here). It follows that $n-1 = 3k - 1 = 3k - 3 + 2 = 3(k-1) +2$ and $n+1 = 3k +1$. We have to possibilites on the parity of $k$.
If $k$ is even, then $k=2j$ for some $j \in \mathbb{Z}$. Hence $n = 3 \cdot 2 \cdot j = 6k$. Hence $n^{3}-n=6k(n-1)(n+1)$ and $k(n-1)(n+1) \in \mathbb{Z}$. Therefore $n^{3}-n \equiv 0$ (mod $6$) and then $n^{3} \equiv n$ (mod $6$).
If $k$ is odd, then $k = 2i + 1$ for some $i \in \mathbb{Z}$. Hence $n + 1 = 3(2i+1) +1 = 6i + 4 = 2(3i+2)$. It follows that $n^{3} - n = (n-1) (3k) (2(3i +2)) = 6k(n-1)(3i+2)$ and $k(n-1)(3i+2) \in \mathbb{Z}$. Thus $n^{3}-n \equiv 0$ (mod $6$). Therefore $n^{3} \equiv n$ (mod $6$). This completes our proof. $\square$
I would also like to know that if there is other way to prove this result? (In the book, Bloch gives a hint that says to note that $n \equiv 0$ (mod $6$), or ..., or $n \equiv 5$ (mod $6$) and then in each case to compute $n^3$ (mod $6$), but I don’t know how this will work as a proof... any idea?).
Thank you for your attention!