Associated Topics || Dr. Math Home || Search Dr. Math

### Sums of Consecutive Positive Integers

```
Date: 03/02/2001 at 10:17:27
From: Loulie
Subject: Consecutive sums

I am looking at sums of consecutive numbers: i.e. 3 + 4 + 5 = 12.
I have calculated formulae for these, but I am interested in the
numbers that you CANNOT obtain by adding consecutive numbers. Using
only two numbers you can obtain every odd number. The numbers that you
cannot obtain are 2, 2^2, 2^3, 2^4, etc., i.e. 2, 4, 8, 16, etc.
understand and thus prove why powers of 2 are unobtainable?

Thanks,
Loulie
```

```
Date: 03/02/2001 at 11:52:27
From: Doctor Greenie
Subject: Re: Consecutive sums

Hi, Loulie -

First, let's clear up some language:

The term "consecutive numbers" is meaningless, because if a and b
are two different numbers, then the average of the two numbers is
between them. So you aren't looking at sums of consecutive numbers,
you are looking at sums of consecutive INTEGERS.

ANY integer "n" can be written as the sum of consecutive integers:

[-(n-1)]+[-(n-2)]+...+[-1]+0+1+2+...+(n-2)+(n-1)+n = n

For example, the number 4 CAN be written as the sum of consecutive
integers:

(-3)+(-2)+(-1)+0+1+2+3+4 = 4

So you are not just looking at sums of consecutive integers, you are
looking at sums of consecutive POSITIVE INTEGERS.

And now on to an investigation as to why the powers of 2 are the only
numbers you can't get as the sum of a series of consecutive positive
integers....

The average of a set of numbers is defined as the sum of all the
numbers divided by how many numbers there are. We can turn this
definition around to say that the sum of any set of numbers is the
average of the numbers multiplied by how many numbers there are.

Using this "definition" of the sum of a set of numbers is useful in
finding the sum of any finite arithmetic series, because in any
arithmetic series it is always easy (due to the fact that the numbers
in any arithmetic series are, by definition, "equally spaced") to find
the number of numbers in the series and the average of the numbers in
the series:

average = (first + last)/2  (because the numbers are equally
spaced)
# of numbers = [(last - first)/common difference] + 1

We can use this "definition" of the sum of a set of numbers, because
the sum of consecutive integers is an arithmetic series in which the
difference between consecutive elements of the series is 1.

We need to consider two cases: sums of consecutive integers with an
odd number of elements, and sums with on even number of elements.

(1) If the number of elements is odd, then the first and last elements
are either both even or both odd, and the average of all the elements
of the series is therefore an integer. So in this case the sum of the
elements of the series is (number of elements) times (average of
elements), which for this case is (odd integer) times (integer).

(2) If the number of elements is even, then the first and last
elements are one even and one odd, and the average of all the elements
of the series is therefore halfway between two integers. So in this
case the sum of the elements of the series is

(number of elements) times (average of elements),

which for this case is

(even integer) times (number halfway between two integers).

In this multiplication, we can divide the first factor by two and
multiply the second factor by two; half of an even integer is an
integer, and two times a number that is halfway between two integers
is an odd integer. So in this case the sum of the series is

(integer) times (odd integer).

We have shown that the sum of ANY series of consecutive integers can
be expressed as (integer) times (odd integer). Therefore, the only
positive integers that CANNOT be expressed as the product of an
integer and an odd integer are those integers whose only factors are
even. Because 2 is the only even prime number, the only integers that
cannot be expressed as the sum of a series of consecutive positive
integers are the powers of 2.

- Doctor Greenie, The Math Forum
http://mathforum.org/dr.math/
```

```
Date: 01/04/2002 at 17:30:21
From: Gus Rabson
Subject: Consecutive sums

The above is an erroneous proof. It proves that powers of 2 cannot be
expressed as sums of consecutive integers. The proof is very elegant.
But it does not prove that there are no other integers with that
property.

Gus
```

```
Date: 01/06/2002 at 02:25:19
From: Doctor Greenie
Subject: Re: Consecutive sums

Hello, Gus -

I think the proof as I presented it is complete.  I showed that a
number can be written as the sum of consecutive positive integers if,
and only if, its prime factorization includes an odd prime factor;
then, since 2 is the only even prime number, the conclusion is that
the powers of 2 are the only numbers that cannot be written as the sum
of consecutive positive integers.

Here is another approach to the same problem....

Suppose we have a number n which we want to write as the sum of
consecutive positive integers.

Suppose first that the number n is a prime number. n = 2 can clearly
not be written as the sum of consecutive positive integers, because
the first two positive integers are 1 and 2. And all prime numbers
other than 2 are odd, and any odd number of the form 2k+1 (k an
integer) is the sum of the two consecutive integers k and k+1.

So we have shown that the only prime number that cannot be written as
the sum of consecutive positive integers is 2.

Now let's consider the case where our number n is not prime. We can
write the number n as

n = (p)(m)

where p is a prime and m may or may not be prime.

In this case, if the prime factor p is not 2, then it is an odd
number, of the form 2k+1. Then we have

n = (2k+1)(m) = 2km + m

This number is the sum of the consecutive integers

(m-k), (m-k+1), ... , (m-1), m, (m+1), ... (m+k-1), (m+k)

This demonstrates that ANY TIME the number n contains an odd prime
factor, it can be written as the sum of consecutive positive integers
- therefore, the only numbers that cannot be written as the sum of
consecutive positive integers are those whose prime factorizations
include no odd prime numbers; that is, the prime factorization
contains only factors of 2, which means the number n is a power of 2.

If you still have doubts about the completeness of the proof, please
write back explaining why; I will be happy to discuss this with you
further.

- Doctor Greenie, The Math Forum
http://mathforum.org/dr.math/
```

```
Date: 01/06/2002 at 11:47:44
From: Gus Rabson
Subject: Consecutive sums

Thanks - this last communication was very clear. I appreciate it.
```
Associated Topics:
High School Number Theory
High School Sequences, Series

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search