# Math Help - sum of squares divisible by 4

1. ## sum of squares divisible by 4

if Sm denotes sum of squares of first m natural numbers then for how many m<100 is Sm multiple of 4?

2. ## Re: sum of squares divisible by 4

Originally Posted by nikhil
if Sm denotes sum of squares of first m natural numbers then for how many m<100 is Sm multiple of 4?
24

$\left( \begin{array}{cc} 7 & 140 \\ 8 & 204 \\ 15 & 1240 \\ 16 & 1496 \\ 23 & 4324 \\ 24 & 4900 \\ 31 & 10416 \\ 32 & 11440 \\ 39 & 20540 \\ 40 & 22140 \\ 47 & 35720 \\ 48 & 38024 \\ 55 & 56980 \\ 56 & 60116 \\ 63 & 85344 \\ 64 & 89440 \\ 71 & 121836 \\ 72 & 127020 \\ 79 & 167480 \\ 80 & 173880 \\ 87 & 223300 \\ 88 & 231044 \\ 95 & 290320 \\ 96 & 299536 \\ \end{array} \right)$

there may be some clever way of doing this that one of our number theory experts can comment on.

3. ## Re: sum of squares divisible by 4

there is another way of doing this

$\displaystyle \sum_{k=1}^n k^2 = \dfrac{n(n+1)(2n+1)}{6}$

so by solving

$n(n+1)(2n+1) \mod 24 = 0\mbox{ for }1 < n < 100$ you find your answer

you can note it's the same n's as found by brute force checking.