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

4

^{2}+ 3

^{2}+ 2

^{2}+ 1

^{2}= 30, which is divisible by 5.

and it doesn't have to be a square, the same series using cubes gives:

4

^{3}+ 3

^{3}+ 2

^{3}+ 1

^{3}= 100, which is also divisible by 5.

In general, the first baby rule says for prime p, (p-1)

^{n}+ (p-2)

^{n}+ ... + 1

^{n}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.