Home / All calculators / Consecutive Integers Calculator

Mathematics · Free online calculator

Consecutive Integers Calculator

Enter a target sum to list all representations using two or more positive consecutive integers. The search uses integer arithmetic so it does not rely on floating-point equality.

Calculator

Accepted range: 3 to 1,000,000,000. One-term representations are excluded.

Enter values and calculate.

Formula and method

For k consecutive integers beginning at a, a, a + 1, …, a + k − 1, the sum is S = k(2a + k − 1)/2. For target N and k ≥ 2, solve a = (2N/k − k + 1)/2; accept a run only when this start is a positive integer.

The calculator uses the entered values and displays the result in the browser. It does not send your calculation inputs to a server.

Worked example

For N = 15, the positive runs are 7 + 8, 4 + 5 + 6, and 1 + 2 + 3 + 4 + 5. Each run has at least two terms, and each term is positive.

Scope and limitations

Only positive consecutive integers and sums of at least two terms are included. Zero, negative terms and the trivial one-term representation N are excluded. The target must be an integer from 3 through 1,000,000,000. An empty result means no positive run of two or more consecutive integers sums to that target.

Frequently asked questions

Why is the target itself not shown?

The calculator excludes the trivial one-term representation and lists only sums with two or more terms.

Are negative or zero integers included?

No. This tool searches positive consecutive integers only.

Why use exact integer arithmetic?

A valid start must be an integer. Exact divisibility checks avoid accepting a near-integer due to floating-point rounding.

References

These educational sources support the mathematical method described on this page.

  1. OpenStax — Arithmetic Sequences
  2. Richland Community College — Arithmetic Sequences

Related calculators

Scientific Calculator · Quadratic Equation Solver · All calculators

Friendly Calculator provides general educational tools. Check the method and assumptions before relying on any result.