Proof that $a(a+1)(2a+1)$ is divisible by $6$ for every integer a This is from the book Elementary Number Theory by Jones & Jones
Example 3.6
Let us prove that a(a+1)(2a+1) is divisible by 6 for every integer a
By taking least absolute residues mod(6) we see that $a \equiv 0,\pm1,\pm2 or 3$.
If $a \equiv 0$ then $a(a+1)(2a+1) \equiv 0 \cdot 1 \cdot 1 \equiv 0$, if $a \equiv 1$, then $a(a+1)(2a+1) \equiv 1 \cdot 2 \cdot 3 = 6 \equiv 0$, and similar calculations (which you should try for yourself) show that $a(a+1)(2a+1) \equiv 0$ in the other 4 cases, so $6 \vert a(a+1)(2a+1)$ for all a.

I don't understand the proof at all starting with the first line - By taking least absolute residues mod(6) we see that $a \equiv 0,\pm1,\pm2 or 3$. - How does taking absolute residues mod(6) give $a \equiv 0,\pm1,\pm2 or 3$?

Hint:
It's much better to use:
$$a(a+1)(2a+1)=a(a+1)(2(a-1)+3)=2\underbrace{(a-1)a(a+1)}_{\text{ The product of } 3\text{ consecutive integers }}+3a(a+1)$$
Use The product of $n$ consecutive integers is divisible by $n$ factorial
