How to show $n(n+1)(2n+1) \equiv 0 \pmod 6$?

A rather unconventional way to solve this is by using the identity $$\sum^n_{k=0}k^2=\frac{n(n+1)(2n+1)}{6}$$ Since $\dfrac{n(n+1)(2n+1)}{6}$ is a sum of integers, it must be an integer as well. Therefore $n(n+1)(2n+1)$ is divisible by $6$.


${\rm mod}\ 6\!:\ f(n) = n(n\!+\!1)(2n\!+\!1)\,$ is constant by $\,f(n)-f(n\!-\!1) = 6n^2\equiv 0,\,$ so $\,f(n)\equiv f(0)\equiv 0$.

Remark $\ $ Summing the above difference, using telescopy, we obtain $\,f(n) = 6\sum_{k=1}^n k^2\equiv 0$