Understanding the consecutive integers calculator — concept and principle
This calculator finds a run of consecutive integers, consecutive even integers or consecutive odd integers from their sum and how many there are. It also writes out the equation in n. Use it for algebra word problems such as "three consecutive even integers add up to 84".
How it is calculated
Consecutive integers: n, n + 1, n + 2, … (step 1)
Consecutive even or odd integers: n, n + 2, n + 4, … (step 2)
Sum of k terms = k·n + step × k(k − 1) ÷ 2
First integer n = (sum − step × k(k − 1) ÷ 2) ÷ k
- If n is not a whole number, or has the wrong parity for even or odd integers, no such set exists.
- The middle value always equals the average, sum ÷ k.
The principle
Equally spaced numbers are balanced around their average: for every number above the middle there is one equally far below it. So the average of the run is the sum divided by how many numbers there are, and the numbers are laid out evenly around it. Writing the unknowns in terms of the first one, n, turns the word problem into a linear equation with one unknown.
Worked example
Default inputs: sum 84, 3 integers, consecutive even integers.
- Written out: n + (n + 2) + (n + 4) = 84, i.e. 3n + 6 = 84.
- 3n = 78, so n = 26, which is even, as required.
- The integers are 26, 28, 30; last integer 30.
- Middle value = 84 ÷ 3 = 28, the average.
How to read the result
Check by adding the numbers back up. If the page reports that no set exists, the sum does not fit: for example, three consecutive odd integers always add to an odd number, so no three consecutive odd integers sum to 84. Negative answers are valid integers too.
Common mistakes
- Using a step of 1 for even or odd integers.
- Writing consecutive odd integers as n, n + 1, n + 3.
- Forgetting to check that n has the right parity.
- Dividing the sum by k and reporting only the middle number.
Frequently asked questions
How do you find three consecutive integers with a given sum?
Divide the sum by 3 to get the middle number, then take one less and one more.
Why use n + 2 for consecutive odd integers?
Odd numbers are two apart, just like even numbers.
Can consecutive integers be negative?
Yes, for example −2, −1, 0 add up to −3.
Sources: OpenStax, Elementary Algebra 2e (2020), §3.1 Use a Problem-Solving Strategy