I just came across this in an article in The American Mathematical Monthly Vol. 1, No. 6, Jun., 1894. The article is taken from a paper by J. W. NICHOLSON., President and Professor of Mathematics at Louisiana State University.
To keep it simple I will present a very small example of the professor's theorem.
Pick a prime number, p (I'll use five because it keeps things short and easy) .
Now take the sum of the squares of every integer smaller than p and "voila", it is divisible by p
42 + 32 + 22 + 12 = 30, which is divisible by 5.
and it doesn't have to be a square, the same series using cubes gives:
43 + 33 + 23 + 13 = 100, which is also divisible by 5.
In general, the first baby rule says for prime p, (p-1)n + (p-2) n + ... + 1n will be divisible by p as for any power n smaller than p.
Go ahead, try a few of your own.
Now to kick it up a little... let's add in any constant, c, to the mix.
It is also true, that for prime p and n smaller than p:
(c+p-1)n+(c+p-2)n ...... + (c+0)n will also be divisible by p.
If I keep p = 5 and use c=2 the series would be :
(2+4)2+(2+3)2++(2+2)2+(2+1)2 + (2+0)2 =90 which is still divisible by 5.
Ok, and one to grow on: you can use a constant multiplier in front of the p-x terms... for example using a multiplier of three in each case we have
(2+3x4)2+(2+3x3)2+(2+3x2)2+(2+3x1)2 + (2+0)2 =410 which is still divisible by 5.
According to the Professor, this works only if, we use a prime p, As pointed out in the comments, there are some primes for which this is not true. I originally misstated what he wrote.
No justification was given, and I can provide none, so if you know how to prove this, I will welcome your proof and post it here.