terican

Last verified · v1.0

Calculator · math

Consecutive Integers Calculator

Find consecutive integers that add up to a target sum. Supports standard, even, and odd integer sequences with instant results.

FreeInstantNo signupOpen source

Inputs

First Integer in Sequence

Explain my result

0/3 free

Get a plain-English breakdown of your result with practical next steps.

First Integer in Sequence

The formula

How the
result is
computed.

How the Consecutive Integers Calculator Works

The consecutive integers calculator applies a single algebraic formula to find any sequence of back-to-back integers — standard, even, or odd — that adds up to a specified target sum. This tool handles classic algebra word problems, number theory explorations, and math competition preparation with equal precision.

The Core Formula

The first integer x in the sequence is determined by:

x = (S − k ⋅ N(N − 1) / 2) / N

Each variable plays a distinct role:

  • S — the target sum that all integers in the sequence must total
  • N — the count of consecutive integers in the sequence
  • k — the step size: 1 for consecutive integers, 2 for consecutive even or consecutive odd integers
  • x — the first (and smallest) integer in the resulting sequence

Once x is calculated, every subsequent term follows as x + k, x + 2k, and so on through x + (N − 1)k.

Formula Derivation

Consider N consecutive integers beginning at x with uniform step k. The i-th term (starting at i = 0) equals x + ik. Summing all N terms produces:

S = Nx + k(0 + 1 + 2 + … + (N − 1)) = Nx + k ⋅ N(N − 1) / 2

Subtracting k ⋅ N(N − 1) / 2 from both sides and then dividing by N isolates x in one step. This algebraic manipulation follows the principles of linear equation solving documented in Khan Academy's lesson on sums of consecutive integers and is reinforced in the West Texas A&M University tutorial on the Multiplication Property of Equality.

Choosing the Right Step Size k

  • k = 1 — Consecutive Integers: Terms increase by 1. Example sequence: 11, 12, 13, 14.
  • k = 2 — Consecutive Even Integers: Terms increase by 2 and every term is even. Example: 6, 8, 10, 12.
  • k = 2 — Consecutive Odd Integers: Terms increase by 2 and every term is odd. Example: 7, 9, 11, 13.

Worked Examples

Example 1: Three Consecutive Integers Summing to 24

Inputs: S = 24, N = 3, k = 1

x = (24 − 1 ⋅ 3 ⋅ 2 / 2) / 3 = (24 − 3) / 3 = 21 / 3 = 7

Sequence: 7, 8, 9 → 7 + 8 + 9 = 24 ✓

Example 2: Four Consecutive Even Integers Summing to 36

Inputs: S = 36, N = 4, k = 2

x = (36 − 2 ⋅ 4 ⋅ 3 / 2) / 4 = (36 − 12) / 4 = 24 / 4 = 6

Sequence: 6, 8, 10, 12 → 6 + 8 + 10 + 12 = 36 ✓

Example 3: Five Consecutive Odd Integers Summing to 55

Inputs: S = 55, N = 5, k = 2

x = (55 − 2 ⋅ 5 ⋅ 4 / 2) / 5 = (55 − 20) / 5 = 35 / 5 = 7

Sequence: 7, 9, 11, 13, 15 → 7 + 9 + 11 + 13 + 15 = 55 ✓

Validity Conditions

A valid solution requires x to be a whole number. If the formula returns a decimal, no sequence of the chosen type satisfies the given inputs. For even sequences, x must also be even; for odd sequences, x must be odd. Adjusting N or the integer type typically resolves invalid results.

Handling Edge Cases and Optimization

Sometimes initial inputs produce non-integer results or sequences where the first term fails to match parity requirements — even values for even sequences, odd values for odd sequences. When this occurs, several troubleshooting strategies improve outcomes. First, verify that your target sum S and sequence length N are compatible with the step size k. For consecutive even or odd integers, the sum S must have the same parity as N times k. Second, incrementally adjust the count N to nearby values — trying N+1 or N−1 often yields valid solutions. Third, consider whether switching between consecutive, even, and odd modes aligns better with your problem constraints. The calculator's ability to test multiple configurations rapidly makes it an invaluable tool for exploratory number analysis and educational verification of algebraic reasoning.

Real-World Applications

  • Algebra Education: Solving standard word problems about consecutive number sequences at the middle- and high-school level.
  • Math Competitions: Rapidly verifying integer-sum problems under time constraints.
  • Puzzle Construction: Designing number puzzles with prescribed sums and sequence lengths.
  • Number Theory: Investigating arithmetic progressions and properties of integer partitions.

Reference

Frequently asked questions

What is a consecutive integers calculator used for?
A consecutive integers calculator finds the exact sequence of back-to-back integers that adds up to a specified total. It solves algebra word problems such as finding three consecutive integers that sum to 48 (answer: 15, 16, 17) or four consecutive even integers that sum to 100 (answer: 22, 24, 26, 28), eliminating the need for manual trial and error.
How do you find consecutive integers that add up to a given sum?
Apply the formula x = (S minus k times N(N minus 1) divided by 2) divided by N. Here S is the target sum, N is how many integers are needed, and k equals 1 for standard consecutive integers or 2 for even or odd types. For example, five consecutive integers summing to 100 gives x = (100 minus 10) / 5 = 18, producing the sequence 18, 19, 20, 21, 22.
What is the difference between consecutive even and consecutive odd integers?
Consecutive even integers are even numbers spaced 2 apart, such as 4, 6, 8, and 10. Consecutive odd integers are odd numbers also spaced 2 apart, such as 3, 5, 7, and 9. Both types use step k = 2 in the formula. The key distinction is parity: x must be an even number for even sequences and an odd number for odd sequences for a valid result.
Can the calculator find consecutive integers that are negative?
Yes. The formula handles negative results without modification. For example, four consecutive integers summing to negative 10 yields x = (negative 10 minus 6) divided by 4 = negative 4, giving the sequence negative 4, negative 3, negative 2, negative 1. Adding these confirms the sum: negative 4 plus negative 3 plus negative 2 plus negative 1 equals negative 10, a fully valid mathematical result.
What does it mean when the result is not a whole number?
A non-integer value of x means no valid sequence of the chosen type exists for those specific inputs. For instance, two standard consecutive integers cannot sum to 7, because that calculation produces x = 3.5. To resolve this, change the count of integers N, switch between consecutive, even, or odd mode, or choose a different target sum that yields a whole-number solution.
Is there a limit to how many consecutive integers the calculator can find?
The formula x = (S minus k times N(N minus 1) divided by 2) divided by N scales to sequences of any length. Finding 2 consecutive integers or 200 consecutive integers uses the same single calculation. Larger values of N simply widen the output sequence. The only requirement is that the inputs produce a whole-number value for x; otherwise no valid sequence exists for those parameters.