How do I find consecutive integers whose sum equals a given number?
For n consecutive integers starting at x, the sum equals n·x + (0+1+2+…+(n−1)) = S. Solving for x gives x = (S − n(n−1)/2) / n. If x is a whole integer, a valid solution exists. This calculator handles that algebra for you automatically.
How do I find three consecutive integers with a given sum?
Let the integers be n, n+1, and n+2. Their sum is 3n + 3 = S, so n = (S − 3) / 3. For example, if the sum is 45: n = (45 − 3) / 3 = 14, giving integers 14, 15, 16.
What are consecutive odd or even integers?
Consecutive odd integers differ by 2 (e.g., 1, 3, 5, 7) and consecutive even integers also differ by 2 (e.g., 2, 4, 6, 8). Both are represented as n, n+2, n+4, … The formulas differ from regular consecutive integers because the step is 2 instead of 1. You might also find our Long Division Calculator useful.
How do I find two consecutive integers with a given sum?
Let the integers be n and n+1. Their sum is 2n + 1 = S, so n = (S − 1) / 2. This works only when S is odd. If S is even, there are no two consecutive integers with that sum (though two consecutive even or odd integers may work).
Does every target sum have a consecutive integer solution?
Not always. A valid solution requires the starting integer to be a whole number (integer). If the calculation produces a decimal or fraction, no set of consecutive integers of that type and count sums to the target. The calculator will indicate this in such cases.
Can consecutive integers be negative?
Yes. Consecutive integers extend infinitely in both directions. For example, the three consecutive integers that sum to −6 are −3, −2, and −1. The calculator handles negative starting values correctly.
What is the formula for the sum of consecutive integers from n1 to n2?
The sum of all integers from a to b inclusive is (b − a + 1) × (a + b) / 2. For example, the sum from 1 to 100 is 100 × 101 / 2 = 5050. This is related to the triangular number formula n(n+1)/2.