Is a proof using modular arithmetic in a question like this valid? It's been two years or so since I've finished my math undergrad (and I'm doing something non-math related now, unfortunately), so I apologize if what is to follow isn't a very good question!
Prove that for all Integers $n$, $n(n + 1)(2n + 1)$ will always be divisible by 6.
I can do that using induction, but I wanted to try a different way. Does it work to use modular arithmetic in the following way?
Let $f(n) = n(n+1)(2n+1) = 2n^3 + 3n^2 + n$. All we need to show is that $f(n)$ is divisible by both $2$ and $3$ for any choice of $n$.
Evaluate mod $2$.
$f(n) = n(n+1)(2n+1) = n(n+1)(0 + 1)$ mod $2 = n(n+1)$ mod $2$. Two consecutive numbers; one of them must be even, and so $f(n)$ is divisible by $2$.
Evaluate mod $3$
There are three possible residues for n modulo $3$: $0, 1,$ or $2$.
If the residue is $0$, then $f(n)$ is divisible by $3$.
If the residue is $1$, then $f(n) = n(n+1)(2n+1) = 1(1+1)(2*1+1) = 1(2)(3) = 0$ mod $3$.
If the residue is $2$, then $f(n) = 2(2+1)(2*2+1) = 2(3)(2) = 0$ mod $3$.
In any case, $f(n)$ is divisible by $3$.
Since $f(n)$ is divisible by $2$ and by $3$, it is divisible by $6$. The result follows.
Thank you!

$$n(n+1)(2n+1)=n(n+1)(2n+4-3)=2\underbrace{n(n+1)(n+2)}-3n(n+1)$$
Use The product of n consecutive integers is divisible by n factorial
