Introduction
Some whole numbers can be arranged as a run of consecutive positive integers and added to make the original number. For example, 15 is both 7 + 8 and 4 + 5 + 6. The pattern is not random: every positive integer that is not a power of 2 has at least one such sum with two or more terms. A simple formula explains why, and connects the possible sums to the number’s odd factors.
- What Counts as a Sum of Consecutive Integers?
- The Key Rule: Powers of 2 Are the Exception
- How to Test a Number with a Formula
- Why Powers of 2 Cannot Make a Longer Positive Run
- Why Odd Factors Predict the Number of Representations
- Finding the Runs in Practice
- Why the Length Changes the Starting Number
- Common Misunderstandings
- Conclusion
What Counts as a Sum of Consecutive Integers?
A sum of consecutive integers uses numbers that follow one another without gaps, such as 5 + 6 + 7 or 10 + 11. In this article, the terms are positive whole numbers, and a representation of interest has at least two terms. A number written by itself, such as 12 = 12, is technically a one-term sum but does not show the pattern.
The order of the terms is fixed: a run goes from its smallest number to its largest. Thus, 3 + 4 + 5 is a consecutive sum, while 3 + 5 + 6 is not, because it skips 4.
Different runs can produce the same total. For instance, 15 can be made by two consecutive numbers, by three consecutive numbers, or by five consecutive numbers. Other totals have fewer options, and some have none if at least two positive terms are required.
The Key Rule: Powers of 2 Are the Exception
Among positive whole numbers, the precise rule is this: a number has a representation as a sum of two or more consecutive positive integers if and only if it is not a power of 2. Powers of 2 include 1, 2, 4, 8, 16, and 32. Under the positive-term rule, none of these can be expressed as a longer consecutive run.
Every other positive whole number can be written in at least one such way. For example, 12 is not a power of 2, and 12 = 3 + 4 + 5. The number 21 has more than one option: 10 + 11, 6 + 7 + 8, and 1 + 2 + 3 + 4 + 5 + 6.
This rule concerns positive terms. If zero or negative integers are allowed, the possibilities change. For example, 4 can be written as -2 + -1 + 0 + 1 + 2, but that is not a sum of consecutive positive integers. Keeping the convention clear prevents apparent exceptions.
How to Test a Number with a Formula
Suppose a number n is the sum of k consecutive positive integers, beginning with m. Here, k is the number of terms and m is the first term. The next terms are m + 1, m + 2, and so on, giving this equation:
n = m + (m + 1) + (m + 2) + … + (m + k – 1)
Adding the terms gives a compact formula:
n = km + k(k – 1)/2
The first part, km, would be the total if every term were m. The second part accounts for the increases of 1, 2, and up to k – 1 in the remaining terms. Rearranging gives a useful test for a chosen length k:
m = [n – k(k – 1)/2] / k
A run of length k works when this calculation gives a positive whole number. If it gives a fraction, the terms would not start at a whole number. If it gives zero or a negative number, the run would not consist entirely of positive terms.
For example, test 15 with three terms. Substituting k = 3 gives m = [15 – 3(2)/2] / 3 = (15 – 3)/3 = 4. So the run begins at 4: 4 + 5 + 6 = 15.
Why Powers of 2 Cannot Make a Longer Positive Run
The formula can also show why powers of 2 are excluded. A useful way to examine a run is to double its sum and center the terms around the middle. This produces the identity:
2n = k(2m + k – 1)
The two factors on the right are positive integers. They have opposite parity: if k is even, the second factor is odd; if k is odd, the second factor is even. In particular, their product includes an odd factor greater than 1 whenever the run has at least two terms.
A power of 2 has no odd factor greater than 1; its only positive odd factor is 1. Therefore it cannot equal the product required for a run of two or more positive consecutive terms. This gives a mathematical reason behind the exception, rather than just a pattern noticed in examples.
Conversely, an odd factor greater than 1 allows a suitable consecutive run to be constructed. The detailed pairing of factors depends on whether the run has an even or odd number of terms, but the outcome is that any positive integer with an odd factor beyond 1 has at least one nontrivial representation. Numbers with such a factor are exactly the positive integers that are not powers of 2.
Why Odd Factors Predict the Number of Representations
The same relationship reveals more than whether a representation exists. For a positive integer n, the number of ways to write it as a sum of consecutive positive integers, counting the one-term expression n itself, equals the number of positive odd divisors of n.
A divisor is a whole number that divides another whole number with no remainder. For example, the positive odd divisors of 15 are 1, 3, 5, and 15. Since there are four, 15 has four representations when the single-term expression is included. Removing 15 by itself leaves three runs of two or more terms.
For 15, those three runs are:
7 + 8 = 15
4 + 5 + 6 = 15
1 + 2 + 3 + 4 + 5 = 15
For 12, the positive odd divisors are 1 and 3. That means there are two representations including the single term 12, and one representation with at least two terms: 3 + 4 + 5.
For 8, the only positive odd divisor is 1. It has just the one-term representation, 8 itself, and no longer run of positive consecutive integers. This matches the power-of-2 rule.
Finding the Runs in Practice
One straightforward method is to test possible lengths. For a number n, try k = 2, then k = 3, and continue while the smallest possible sum of k positive consecutive integers does not exceed n. That smallest sum is 1 + 2 + … + k, or k(k + 1)/2.
For each length, calculate m = [n – k(k – 1)/2] / k. Keep the result when m is a positive whole number, then list m through m + k – 1. This approach is practical for small numbers and makes the condition visible.
For example, with 21 and k = 2, the formula gives m = [21 – 1]/2 = 10, producing 10 + 11. With k = 3, it gives m = [21 – 3]/3 = 6, producing 6 + 7 + 8. With k = 6, it gives m = [21 – 15]/6 = 1, producing 1 + 2 + 3 + 4 + 5 + 6.
For a quick existence check, repeatedly divide n by 2 as long as the result is even. If the final odd number is greater than 1, n is not a power of 2 and has a nontrivial representation. If the result is 1, n is a power of 2 and has none under the positive-term convention. This check tells whether a run exists, while testing lengths or examining odd divisors helps find the actual runs.
Why the Length Changes the Starting Number
A fixed total can be split into a short run or a longer run, but the starting point must adjust. A longer run contains more terms, so to keep the total unchanged it generally has to begin with smaller numbers. The formula makes this trade-off precise: increasing k changes both the number of terms and the minimum amount added by the steps between them.
For an odd number such as 15, one representation starts at 7 and uses two terms, while another starts at 1 and uses five. The central value of an odd-length run is itself an integer; for example, 4 + 5 + 6 is centered on 5. An even-length run has its center between two terms, as 7 + 8 is centered on 7.5. Thinking about the center can make some sums easier to spot.
Common Misunderstandings
First, “not a power of 2” does not mean “odd.” Even numbers can have the required odd factor. For instance, 12 is even, but it has the odd divisor 3 and can be written as 3 + 4 + 5.
Second, a representation may not be unique. The odd-divisor rule gives the count, including the one-term expression, rather than claiming that each number has exactly one run. The number 21, for example, has three nontrivial runs.
Finally, the result depends on what counts as a term. The familiar rule is for positive consecutive integers. Allowing zero or negative terms can produce additional representations, so those cases should not be mixed with the positive-integer rule.
Conclusion
A positive whole number can be written as a sum of two or more consecutive positive integers exactly when it is not a power of 2. The formula for a run tests its length and starting value, while the number’s odd divisors reveal how many representations it has. Together, these ideas turn a simple-looking addition puzzle into a clear link between consecutive numbers and factors.

