Return to my Mathematics pages
Return to the previous page
Go to my home page


Sum of n Consecutive Integers (answer)

© Copyright 1999, Jim Loy

To repeat what I said before (so you don't have to keep flipping pages): You may already know that 1+2+3+4+5=15. Let's try five other consecutive integers: 14+15+16+17+18=80. How about -1+0+1+2+3=5? We might guess that the sum of 5 consecutive integers is divisible by 5. That turns out to be true, as we will see later. Maybe the sum of n consecutive integers is divisible by n. That turns out not to be true: 1+2 is not divisible by 2.

Question: When is the sum of n consecutive integers divisible by n, and when is it not divisible by n? You may want to figure that out before reading the answer.


Answer: The sum of n consecutive integers is divisible by n when n is odd. It is not divisible by n when n is even. How would you prove that? You might want to prove it, before checking your proof below.


The sum of n consecutive integers is divisible by n when n is odd. It is not divisible by n when n is even.

Proof: Case I - n is odd: We can substitute 2m+1 (where m is an integer) for n. This lets us produce absolutely any odd integer. What is the sum of any 2m+1 consecutive integers? It is an arithmetic series (like 13+17+21+25 which has a common difference of 4). The sum of an arithmetic series is:

  a + a+d + a+2d + a+3d + ... + a+(n-1)d = n(first+last)/2

There are other equivalent formulas. In our problem, the common difference is 1:

  a + (a+1) + (a+2) + ... + (a+2m) = (2m+1)(2a+2m)/2 = (2m+1)(a+m)

It is obvious that this is divisible by 2m+1, our original odd number. That proves case I.

Case II - n is even: We can substitute 2m for n. Again we have an arithmetic series:

  a + (a+1) + (a+2) + ... + (a+2m-1) = (2m)(2a+2m-1)/2 = m(2a+2m-1)

At first glance, this would seem to not be divisible by 2m, as 2a+2m-1 is odd. But xy can be divisible by z, even if neither x nor y is divisible by z. This sum is 2am+2m^2-m, which is m less than a multiple of 2m. So this sum cannot be a multiple of 2m. You might want to figure out why that is so. In other words, the sum is not divisible by 2m, our original even number. And that proves case II.


Return to my Mathematics pages
Return to the previous page
Go to my home page