For which positive integers $n$ is it true that $$1^2 + 2^2 + \cdots + (n − 1)^2 \equiv 0 \,(\text{mod } n)$$
I have no idea where to start. I'm just looking for a nudge in the right direction. Any idea how to go about solving? Thanks for any help.
For which positive integers $n$ is it true that $$1^2 + 2^2 + \cdots + (n − 1)^2 \equiv 0 \,(\text{mod } n)$$
I have no idea where to start. I'm just looking for a nudge in the right direction. Any idea how to go about solving? Thanks for any help.
Copyright © 2021 JogjaFile Inc.
Hint: using a well-known formula, $$1^2 + 2^2 + \cdots + (n − 1)^2=n\frac{(n-1)(2n-1)}{6}\ .$$ This is a multiple of $n$ if . . . ?