Representing Natural Numbers by
Sums of Consecutive Integers
David W. Hansen
© 2003
12 = 3 + 4 + 5, 29 = 14 + 15, and 45 = 7 + 8 + 9 + 10 + 11 are all examples of natural numbers which can be written as a sum of two or more consecutive integers. Are there others? To answer this, let’s examine a few of the natural numbers.
1 = 1 only, and so cannot be written as a sum of two or more consecutive integers.
2 = 1 + 1, but these are not consecutive integers.
3 = 1 + 2 and is the smallest natural number which can be written as a sum of two or more consecutive integers. Note that 3 = 3(1) = 3(1’s) = 1 + 1 + 1, which are not consecutive integers. However, leaving the middle integer unchanged and adding 1 to the right-hand integer, we have the start of a sum of consecutive integers,
1 + 1 + 2. But by adding the 1, we have now increased our sum to 4. To correct this, let’s subtract 1 from the left-hand integer, making it 0 and giving us a sum of consecutive integers, 0 + 1 + 2. We then have
3 = 1 + 1 + 1 = (1 – 1) + 1 + (1 + 1) = 0 + 1 + 2 = 1 + 2,
which is a sum of consecutive integers representing 3. Let’s call this procedure the ordering method.
Trying this method on 4, we get 4 = 4(1’s) = 1 + 1 + 1 + 1. But, alas, there is NO middle integer here since there is an even number of addends, and our method fails. Furthermore, since 4 can be only be written as a sum of integers in the following ways: 1 + 1 + 1 + 1, 1 + 1 + 2, 1 + 3, and 2 + 2, we see that there is no way that 4 can be written as a sum of two or more consecutive integers.
What about 5? 5 = 5(1’s) = 1 + 1 + 1 + 1 + 1, and there is a middle integer. Let’s call this middle integer of a sum of consecutive integers the pivot and try the ordering method on 5. If we add 1 to the integer just to the right of the pivot and subtract 1 from the integer just to the left of the pivot, we get
1 + 1 + 1 + 1 + 1
1 + 0 + 1 + 2 + 1
and the three integers in the middle are now in consecutive order, whereas the far left- and right-hand integers are not. To get more consecutive integers, we must add 2 to the far right-hand integer (and subtract 2 from the far left-hand integer to compensate for this addition), giving us
(1–2) + 0 + 1 + 2 + (1+2)
- 1 + 0 + 1 + 2 + 3
a sum of consecutive integers. Since the sum of the first three integers equals zero, we are left with 2 + 3 as a sum of consecutive integers equal to 5.
Now, 6 = 6(1’s) = 1 + 1 + 1 + 1 + 1 + 1 has an even number of addends and so, like 4, has no pivot, and thus the ordering method cannot be used. But, if we rewrite six as 6 = 3(2) = 2 + 2 + 2, it now has an odd number of addends, and thus a pivot exists. To get a sum of consecutive integers for 6, we use the ordering method and add 1 to the right-hand integer and subtract 1 from the left-hand integer, getting
6 = 2 + 2 + 2 = (2 – 1) + 2 + (2 + 1) = 1 + 2 + 3,
a sum of consecutive integers equal to 6.
These examples suggest that to write a natural number N as a sum of consecutive integers, it must first be
written as a sum of an odd number of addends so as to have a middle integer to serve as a pivot. But then this means that N must have at least one odd factor (other than 1). For example, if we write 12 with its odd factor of
3 first, we get 3(4) = 4 + 4 + 4, 3 (4’s), there are three addends, and thus a pivot, and we can use the ordering
method to find a sum of consecutive integers to represent 12. However, if we write 12 with its even factor of 2 first,
we get 2(6) = 6 + 6, 2 (6’s), there are an even number of addends, and thus no pivot. Furthermore, the first factor of N must be an odd factor, for if its first factor is even, then there will be an even number of addends. 12 written as
3(4) = 4 + 4 + 4 has an odd number of addends, but 12 written as 4(3) = 3 + 3 + 3 + 3 has an even number of addends.
7 = 7(1) = 1 + 1 + 1 + 1 + 1 + 1 + 1. Since the first factor of 7 is odd, there are an odd number of addends, and thus a pivot. Using the ordering method, we add and subtract 1 from the two integers to the right and left of the pivot, giving us 1 + 1 + (1–1) + 1 + (1+1) + 1 + 1 = 1 + 1 + 0 + 1 + 2 + 1 + 1. Next, we add and subtract 2 units from the two integers which are two units to the right and left of the pivot, giving us
1 + (1–2) + 0 + 1 + 2 + (1+2) + 1 = 1 + (- 1) + 0 + 1 + 2 + 3 + 1.
Finally, we add and subtract 3 from the two integers which are three units to the right and left of the pivot, giving us (1–3) + (- 1) + 0 + 1 + 2 + 3 + (1+3) = (-2) + (- 1) + 0 + 1 + 2 + 3 + 4. Since the sum of the first five integers in this last expression equals zero, we have 3 + 4 as a sum of consecutive integers equal to 7.
Now, 8 = 8(1) = 2(4) has no odd factors, so it cannot be written as a sum of consecutive integers (as trial and error quickly shows).
9 = 3(3) = 9(1), which shows that 9 has two odd first factors greater than 1; namely, 3 and 9. Could this mean that we can find two different ways to write 9 as a sum of consecutive integers? Let’s see. Using the ordering method, we have
9 = 3(3) = 3 + 3 + 3 = (3-1) + 3 + (3+1) = 2 + 3 + 4,
and 9 = 9(1) = 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1
= (1-4) + (1-3) + (1-2) + (1-1) + 1 + (1+1) + (1+2) + (1+3) + (1+4)
= (-3) + (-2) + (-1) + 0 + 1 + 2 + 3 + 4 + 5
Since the first 7 underlined integers above total zero, the sum simplifies to 9 = 4 + 5.
Thus, 9 had two odd first factors, and we were able to find two different representations of 9 by consecutive integers; namely, 9 = 2 + 3 + 4, and 9 = 4 + 5.
These examples suggest that if a natural number is to be written as a sum of two or more consecutive integers, it must have at least one odd first factor greater than 1. And our work on 9 suggests that the number of different way to represent a natural number by two or more consecutive integers equals the number of odd factors greater than 1 that the number has. Let’s use 30 to check the accuracy of these statements.
30 has factors of 1, 2, 3, 5, 6, 10, 15, and 30. Of these, three of them (3, 5, and 15) are odd and greater than 1. Thus, we expect that there will be 3 different ways to write 30 as a sum of consecutive integers. Using the ordering method, we find
30 = 3(10) = 10 + 10 + 10 = 9 + 10 + 11,
30 = 5(6) = 6 + 6 + 6 + 6 + 6 = 4 + 5 + 6 + 7 + 8,
and 30 = 15(2) = 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 2
= (-5) +(-4)+(-3)+(-2) +(-1)+ 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9
= 6 + 7 + 8 + 9,
and our conjecture is correct. Of course, we could also try 30 = 2(15) = 15 + 15, but this is the sum of an even number of addends and cannot be written as a sum of consecutive integers. It’s about time that we proved that last statement.
Consider any natural number N which can be written as a sum of consecutive integers, say
N = a + (a + 1) + (a + 2) + (a + 3) + . . . + (a + k),
where a and k are any integers. Let’s try to write N as a sum of addends. Since a appears in each term, and there are k+1 terms, we have
N = (k+1)a + (1 + 2 + 3 + . . . + k) = (k+1)a + k(k+1)/2.
Factoring out the k+1 from the last expression for N above, we get N = (k+1) (a + k/2), (1)
and we have written N as a sum of k+1 of the addends a + k/2.
Dividing the first factor by 2 and multiplying the second factor by 2 in (1) gives us
N = [ (k+1)/2 ] [2a + k ] = [ 2a+k ] [ (k+1)/2 ], (2)
and we have now written N in a second way as a sum of 2a + k of the addends (k+1)/2.
So, if N can be written as a sum of consecutive integers, then it can always be written as a sum of addends, either in the form (1) or (2). However, are these addends in (1) or (2); namely, a + k/2 and (k+1)/2 integers? Let’s see.
Now, either k is even or odd.
a) If k is even, then the factor k+1 in (1) is odd, k/2 is an integer, and thus a + k/2 is an integer. Thus, N is a sum of an odd number of the [a + k/2]’s, and thus is the sum of an odd number of addends.
b) If k is odd, then the factor 2a+k in (2) is odd, and (k+1)/2 is an integer. Thus, N is a sum of an odd number of the (k+1)/2’s, and thus is the sum of an odd number of addends.
So, whether k is odd or even, we have proved that any natural number which can be written as a sum of two or more consecutive integers can only be written as a sum of an odd number of addends, never as a sum of an even number of addends. The contrapositive of this statement gives us
Theorem 1 If a natural number N can not be written as a sum of an odd number of addends
(or, equivalently, if N has no odd factors greater than 1), then N can not be written as a sum of
two or more consecutive integers.
____________________________________________________________________________
Now what kind of natural numbers have no odd factors greater than 1? Odd numbers have only odd factors, of course, since if they had any even factors, they would then be even numbers themselves. Can even numbers have odd factors? Of course! 12 is an even number but it has an odd factor of 3. Now 2 = 2(1) has no odd factors (other than 1), so if we form numbers using just factors of 2, we will get numbers which have no odd factors. Doing this, we get 2, 2(2) = 22 = 4, 2(2)(2) = 23 = 8, and so forth, and we find that those natural numbers which are powers of 2 are the only natural numbers which have no odd factors. Thus, by Theorem 1, they are the only natural numbers which can not be written as a sum of consecutive integers. This gives us
Theorem 2 The only natural numbers N which can not be written as a sum of two or more
consecutive integers are those which can be written in the form 2n, where n is a positive integer.
____________________________________________________________________________
Now, we know from Theorem 1 that if a natural number cannot be written as a sum of an odd number of addends, then it cannot be written as a sum of consecutive integers. But what if a natural number can be written as a sum of an odd number of addends? Can it then be written as a sum of consecutive integers?
To determine the answer to this question, let’s consider any natural number N which can be written as a sum of an odd number of addends, say N = a + a + a + . . . + a + a = ka, where a is a positive integer repeated k times, and k is odd. Then, N is written as an odd number k of the a addends, and since there are an odd number of the addends, there is a middle integer, the pivot. Then we can simply use the ordering method to rewrite this sum of addends as a sum of consecutive integers. Here’s how.
The Ordering Method
First, add and subtract 1 from the two addends which are one unit to the right and left of the pivot.
Second, add and subtract 2 from the two addends which are two units to the right and left of the pivot.
Third, add and subtract 3 from the two addends which are three units to the right and left of the pivot.
In general, add and subtract m from the two addends which are m units to the right and left of the pivot.
Continuing in this manner and noting that since there are k of the a’s, and the pivot is one of them, that
leaves k-1 a’s that are distributed equally to left and the right of the pivot. Thus, there are (k-1)/2 a’s to
the left and the same number of a’s to the right of the pivot. This gives us
N = a + . . . + a + a + a + a + a + . . . + a = ka
N = [ a – (k-1)/2 ] + . . . + (a-2) + (a-1) + a + (a+1) + (a+2) + . . . + [ a + (k+1)/2 ], (3)
which is a sum of consecutive integers.
___________________________________________________________________________________
Negative First Integers
Now, we found out earlier that in finding consecutive integers for 7, 9, and 30, we sometimes obtained negative integers for the first few terms which canceled out with some of the positive integers of our sums.
For example, in 9 = ka = 9(1) = (-3) + (-2) + (-1) + 0 + 1 + 2 + 3 + 4 + 5, we see that the sum of all the integers from the first term F = - 3, to 3 (which is the absolute value of the first term, |F| ) is zero, and the series begins with 4, which is |F| + 1.
Furthermore, by looking at the underlined terms whose sum is zero, we see that there are |F| = 3 terms to the right of 0, |F| = 3 terms to the left of 0, and 0 itself, which gives us |F| +|F| + 1 = 2|F| + 1 = 7 terms whose sum is zero. Since there are originally k = 9 terms in the sum, we have 9 – 7 [or k – (2|F| + 1) ] = 2 positive terms left in the sum; namely, 4 + 5.
Similarly, in 30 = ka = 15(2) = (-5) + (-4) + (-3) + (-2) + (-1) + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9, we see that the sum of all the integers from the first term F = - 5, to 5 (the absolute value of the first term, |F| ) is zero, and the series begins with 6, which is |F| + 1.
Furthermore, by looking at the underlined terms whose sum is zero, we see that there are |F| = 5 terms to the right of 0, |F| = 5 terms to the left of 0, and 0 itself, which gives us |F| +|F| + 1 = 2|F| + 1 = 11 terms whose sum is zero. Since there are originally k = 15 terms in the sum, we have 15 – 11 [or k – (2|F| + 1) ] = 4 positive terms left
in the sum; namely, 6 + 7 + 8 + 9.
In general, if the first term F of a sum of consecutive integers is negative, then the sum of its terms from F to |F| will be zero, and the sum will start with the positive term |F| + 1. The number of terms in the sum will then be
k – (2|F| + 1).
Note: From (3) above, we see that the first term in the sum of consecutive integers for N is F = a – (k-1)/2, and if F is negative, then |F| = - F = - [a – (k-1)/2 ] = (k-1)/2 – a. Then, the number of terms in the sum is
k – (2|F| + 1) = k – 2|F| – 1 = k – 2 [(k-1)/2 – a ] – 1 = k – (k-1) + 2a – 1 = k – k + 1 + 2a – 1 = 2a
We can summarize all of this in
______________________________________________________________________________
Theorem 3 If a natural number N can be written as a sum of an oddnumber k (greater than 1) of
repeated addends a (N = a + a + . . . + a = ka), then it can be written as a sum of two or more
consecutive integers in the following way
N = [ a – (k-1)/2 ] + . . . + (a-2) + (a-1) + a + (a+1) + (a+2) + . . . + [ a + (k+1)/2 ],
where the first integer F is a – (k-1)/2 and the last integer L is a + (k-1)/2.
If F is positive, then the sum starts with F and has k terms.
If F is negative, then the sum starts with |F| + 1 and has 2a terms.
If n is the number of odd factors greater than 1 of N, then there will be n different ways to write N
as a sum of two or more consecutive integers.
______________________________________________________________________________
Example. Find the number of ways that 315 can be written as a sum of consecutive integers, and then find all of these sums. Since 315 = 3(3)(5)(7), its factors are 1, 3, 5, 7, 9, 15, 21, 35, 45, 63, 105, and 315. Since 315 has
11 odd factors greater than 1, there will be 11 different ways to write it as a sum of consecutive integers.
Using the ordering method (and doing the calculations in our head), we get
315 = 3(105) = 105 + 105 + 105 = 104 + 105 + 106.
= 5(63) = 63 + 63 + 63 + 63 + 63 = 61 + 62 + 63 + 64 + 65.
= 7(45) = 45 + 45 + 45 + 45 + 45 + 45 + 45 = 42 + 43 + 44 + 45 + 46 + 47 + 48.
= 9(35), but it is too tedious to write out 9 addends of 35, and then use the ordering method to write the
sum of consecutive integers. Let’s use Theorem 3 to simplify our work. Since 315 = 9(35) = ka, we have k = 9
and a = 35, the first integer F = a – (k-1)/2 = 35 – (9-1)/2 = 35 – 4 = 31, the last integer L = a + (k-1)/2 =
35 + (9-1)/2 = 35 + 4 = 39, and the number of terms is k = 9. This gives us
315 = 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39.
315 = 15(21), so k = 15, a = 21, F = 21 – (15-1)/2 = 14, L = 21 + (15-1)/2 = 28, and there are k = 15 terms.
So, 315 = 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 +22 + 23 + 24 + 25 + 26 + 27 + 28
315 = 21(15) = 21 addends of 15. 15 ± (21-1)/2 = 15 ± 10 = 5 and 25, so F = 5, L = 25, with 21 terms. So,
315 = 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25.
315 = 35(9) = 35 addends of 9. F = 9 – (35-1)/2 = 9 – 17 = - 8, and L = 9+17 = 26. Since F is negative, we start
with |F| + 1 = 8+1 = 9, and there are 2a = 2(9) = 18 terms. Thus,
315 = 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26.
315 = 45(7) = 45 addends of 7. F = 7 – (45-1)/2 = 7 – 22 = - 15, and L = 7+22 = 29. Since F is negative, we start
with |F| + 1 = 15+1 = 16, and there are 2a = 2(7) = 14 terms. Thus,
315 = 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29.
315 = 63(5) = 63 addends of 5. F = 5 – (63-1)/2 = 5 – 31 = - 26, and L = 5+31 = 36. Since F is negative, we start
with |F| + 1 = 26+1 = 27, and there are 2a = 2(5) = 10 terms. Thus,
315 = 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36.
315 = 105(3) = 105 addends of 3. F = 3 – (105-1)/2 = 3 – 52 = - 49, and L = 3+52 = 55. Since F is negative, we
start with |F| + 1 = 49+1 = 50, and there are 2a = 2(3) = 6 terms. Thus,
315 = 50 + 51+ 52 + 53 + 54 + 55.
315 = 315(1) = 315 addends of 1. F = 1 – (315-1)/2 = 1 – 157 = - 156, and L = 1+157 = 158. Since F is negative,
we start with |F| + 1 = 156+1 = 157, and there are 2a = 2(1) = 2 terms. So, 315 = 157 + 158.
Thus, 315 =
104 + 105 + 106
61 + 62 + 63 + 64 + 65
42 + 43 + 44 + 45 + 46 + 47 + 48
31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39
14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 +22 + 23 + 24 + 25 + 26 + 27 + 28
5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25
9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26
16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29
27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36
50 + 51+ 52 + 53 + 54 + 55
157 + 158
References
[1] Bonsangue, Martin V. and Gerald E. Gannon, "From Exploration to Generalization: An Introduction to
Necessary and Sufficient Conditions." Mathematics Teacher 96 (May 2003): 366-371.
___________________________________________________________________________________