Who this is for: The 'no solution' case, where the reason is worth more than the answer.
Find the run
Or the reason there is not one.
3 consecutive integers summing to 45
14, 15, 16
Starting at 14, the 3 consecutive integers sum to 45.
First term
14
everything follows from this
Last term
16
3 terms in all
Step
1
consecutive integers
Sum check
45
the terms above, added
With an odd count the middle term is the average, so it is 45 ÷ 3 = 15, and the rest fall either side of it.
Set the first term as n and every other term follows from it, which turns a word problem into one linear equation.
Every run of positive integers that sums to 45
2 terms, 22 to 23
3 terms, 14 to 16
5 terms, 7 to 11
6 terms, 5 to 10
9 terms, 1 to 9
Only the powers of two have no representation at all — every other positive whole number has at least one.
What this tool shows
Set the first term as n and every other term follows from it, which turns the word problem into one linear equation. With an odd count the middle term is the mean, so the sum has to be a multiple of the count — and when it is not, no run exists at all.
n consecutive integers summing to a target
Consecutive even and consecutive odd runs
Why an odd count needs a multiple
Why an even count needs something else
Negative targets and negative terms
Which numbers admit no run at all
Any run length Even and odd variants Says when none exists Every run a number admits
Consecutive, consecutive even, or consecutive odd.
Updated 7 September 2026 · Works in any browser, no installation
Call the first term n, add the run up, and solve. Three consecutive integers summing to 45 are 14, 15 and 16 — and with an odd count you can shortcut it, because the middle term is the average: 45 ÷ 3 = 15. With an even count there is no middle term, and the condition changes.
At a glance
Formula shown
k consecutive integers from n sum to kn + k(k−1)/2. For consecutive even or odd integers the step is 2, so the sum is kn + k(k−1). Solving for n gives a run exactly when the result is a whole number of the right parity.
Scenario support
The classic “three consecutive integers sum to 45” exercise; page-number and shelf-numbering puzzles; checking whether a total can be split into a consecutive run.
One equation, not a search
The whole method is naming the first term. Once n is fixed, every other term is fixed with it, and a problem that looked like a search becomes one linear equation.
Three consecutive integers are n, n+1 and n+2. Their sum is 3n + 3, so 3n + 3 = 45 gives n = 14. No trial and error, and no guessing.
In general, k terms starting at n sum to kn + k(k−1)/2 — the k copies of n, plus the offsets 0 through k−1, which add to the triangular number k(k−1)/2.
Because the equation is linear, there is at most one run of a given length. It either exists or it does not, and there is never a choice between two.
When there is no answer
Three consecutive integers summing to 100 do not exist, and the reason is worth more than the answer.
With an odd count the middle term is the mean of the run. So the sum must be exactly the count times a whole number — a multiple of the count. 100 is not a multiple of 3, so there is nothing to find.
With an even count there is no middle term; the mean falls between the two central values and lands on a half. So the sum is the count times something-and-a-half, which makes it an odd multiple of half the count. That is why eight consecutive integers CAN sum to 100 — they are 9 through 16.
A page that answered “no solution” and stopped would be hiding the useful part. The condition tells you which run lengths to try before you try any of them.
Even and odd runs
“Three consecutive even integers” is a different problem, and it needs two conditions rather than one.
The step is 2 rather than 1, so k terms from n sum to kn + k(k−1). Solve that for n as before.
But n also has to be the right kind of number. Three consecutive odd integers summing to 60 fails not because the division does not work — it gives 18 — but because 18 is even, and 18, 20, 22 are not odd numbers. The arithmetic succeeds and the parity check does not.
There is a shortcut for odd counts here too: three consecutive odds sum to three times the middle one, and the middle one has to be odd. 57 ÷ 3 = 19, which is odd, so 17, 19, 21 works.
The powers of two
Here is a result that turns an exercise into something worth knowing.
Every positive whole number can be written as a sum of two or more consecutive positive integers — except the powers of two. 1, 2, 4, 8, 16, 32 and so on cannot be, and everything else can.
15 = 7+8 = 4+5+6 = 1+2+3+4+5, three different ways. 64 has none at all.
The reason is that a run of k terms starting at n sums to k(2n + k − 1)/2, and of the two factors k and (2n + k − 1) exactly one is always odd. So any number with a representation has an odd factor above one — and the powers of two have none.
The number of representations is exactly the number of odd divisors above one, which is why 15 — with odd divisors 3, 5 and 15 — has three.
Where it gets used
Word problems. The standard vehicle for teaching “define a variable, then express everything else in terms of it”, which is the single most transferable idea in school algebra.
Puzzles. Page numbers on a folded sheet, houses on one side of a street, seats in a row — all consecutive-run problems in disguise.
Number theory. The powers-of-two result is a genuinely nice theorem reachable from a school exercise, and the counting version connects it to divisors.
Triangular numbers. A run starting at 1 IS a triangular number, and the k(k−1)/2 in the formula is where they come from.
Sources and methodology
The sum formula and the powers-of-two result are standard; these are the references.
Method. The first term is solved for directly rather than by searching, and the divisibility test that decides whether a run exists is done on integers so a near-miss cannot round into a false answer. The suite does not trust the closed form: it re-derives every case from 1 to 300 across run lengths 2 to 8 by exhaustive search and compares, and separately checks that the terms the page actually prints sum back to the target. That engine is verified on every change against 155 hand-written assertions, including that the closed form agrees with an exhaustive search across 2,100 cases, and that only the powers of two admit no run at all, checked to 512. The count and the per-case breakdown are published on the formula verification page.
Related calculators
Where this goes next:
Arithmetic SequenceNth term and sum with both formulas substituted, carried as exact fractions — a step of 0.1 gives exactly 4 at term 40 rather than 3.9999999999999996.
Place ValueEvery digit named and valued, in all three expanded forms and in words — including the decimals, where the first place after the point is tenths and not 'oneths'.
Digital RootEvery round of digit addition shown, with the mod-9 shortcut alongside — and a casting-out-nines checker that will show you a wrong sum passing.
Floor and CeilingFloor, ceiling and truncation side by side — because for negative numbers those are three different answers, and floor(−2.5) is −3 while truncating gives −2.
Absolute Value EquationBoth cases written out, in interval and set-builder notation — with the distinction the topic turns on: a less-than is an AND, a greater-than is an OR.
Prime NumberWhether a number is prime, with a divisor named when it is not and the size of the search stated when it is. Deterministic, not probabilistic.
A consecutive run is an arithmetic sequence with a common difference of one, which is why its sum has a closed form: n terms starting at a add to n·a + n(n − 1)/2. That also settles which totals are reachable at all — a sum of three consecutive integers is always a multiple of three, and a sum of an even count of them never is, which is why some of these problems have no solution rather than a fractional one.
Educational use disclaimer
This is an educational tool. Sums are computed on arbitrary-precision integers, so a large target is handled exactly.
Published the consecutive integers page solving for the first term directly rather than by searching, and naming the condition when no run exists — for an odd count the middle term is the mean, so the sum has to be a multiple of the count.
Carries the theorem that makes the topic worth a page: every positive whole number is a sum of two or more consecutive positive integers except the powers of two, and the number of ways is the number of odd divisors above one.
The suite re-derives every case from 1 to 300 across run lengths 2 to 8 by exhaustive search rather than trusting the closed form.
Add this calculator to your site
Responsive embed — and private: nothing your visitors type leaves their browser.