Number Sequence Calculator

  1. Common difference d = a₂ − a₁ = 4 − 2 = 2
  2. Pattern: arithmetic sequence
  3. Next 5 terms: 10, 12, 14, 16, 18
  4. Sum of first 4 terms Sₙ = (n/2)(2a₁ + (n−1)d) = 20
arithmetic · next: 10, 12, 14…
PropertyValue
Patternarithmetic
Common difference (d)2
nth term formulaaₙ = a₁ + (n−1)d
Sum formulaSₙ = (n/2)(2a₁ + (n−1)d)
Sum S420
Next 5 terms10, 12, 14, 16, 18

aₙ = a₁ + (n−1)d · aₙ = a₁ × r^(n−1)

How Number Sequences Work

A number sequence is an ordered list of numbers that follows a predictable rule. The three most common patterns in school mathematics and introductory discrete math are arithmetic sequences (each term differs by a constant amount), geometric sequences (each term is multiplied by a constant ratio), and Fibonacci-like sequences (each term is the sum of the two before it). This calculator accepts at least three known terms, tests which pattern fits, and reports the governing parameter along with formulas for individual terms and partial sums.

In an arithmetic sequence, the common difference d is found by subtracting consecutive terms: d = a₂ − a₁. If every gap matches, the nth term is aₙ = a₁ + (n − 1)d and the sum of the first n terms is Sₙ = (n/2)(2a₁ + (n − 1)d). Example: 2, 4, 6, 8 has d = 2, so the next terms are 10, 12, 14, 16, 18 and S₄ = (4/2)(4 + 6) = 20. Arithmetic sequences model linear growth — saving the same amount each week, temperatures rising steadily, or seats added row by row in a theater.

A geometric sequence multiplies by a fixed ratio r: r = a₂ / a₁. The nth term is aₙ = a₁ × r^(n−1) and the finite sum (when r ≠ 1) is Sₙ = a₁(1 − rⁿ)/(1 − r). Example: 3, 9, 27, 81 has r = 3, producing next terms 243, 729, 2187, 6561, 19683 and S₄ = 3(1 − 81)/(1 − 3) = 120. Geometric growth appears in compound interest, bacterial doubling, radioactive decay, and pixel scaling in computer graphics.

Fibonacci-like sequences satisfy aₙ = aₙ₋₁ + aₙ₋₂ starting from two seed values. The classic Fibonacci sequence 1, 1, 2, 3, 5, 8, 13 is the most famous, but any pair of starting numbers defines a valid recurrence — for instance 2, 5, 7, 12, 19. Partial sums are computed by direct addition because there is no single closed form as simple as the arithmetic or geometric cases. Fibonacci numbers connect to the golden ratio, combinatorics, and nature patterns such as pinecone spirals.

Use detection mode when you have a fragment of a sequence and want to classify it automatically. Use generator mode when you know a₁ and d or r and want to build a table of terms for homework or plotting. Pair results with the exponent calculator for geometric powers, the average calculator when sequence means matter, and the scientific calculator for manual verification of formulas.

Not every list is one of these three types. Quadratic sequences (square numbers 1, 4, 9, 16) or arbitrary polynomials require different techniques. If detection fails, check for typos, missing terms, or rounding that breaks a clean ratio. Enter integers or decimals with at least three terms for reliable classification, optionally specify how many terms to include in the sum, and copy the nth-term and summation formulas directly into your notes.

Examples

ExampleResult
2, 4, 6, 8 (arithmetic)d = 2; next: 10, 12, 14, 16, 18
3, 9, 27, 81 (geometric)r = 3; next: 243, 729, 2187, 6561, 19683
Sum of first 4 terms: 2, 4, 6, 8S₄ = 20
Sum of first 4 terms: 3, 9, 27, 81S₄ = 120
Fibonacci: 1, 1, 2, 3, 5Next: 8, 13, 21, 34, 55
Generate arithmetic a₁=5, d=3, 6 terms5, 8, 11, 14, 17, 20
Generate geometric a₁=2, r=0.5, 5 terms2, 1, 0.5, 0.25, 0.125

Frequently asked questions

Arithmetic: subtract consecutive terms — the difference stays constant. Geometric: divide consecutive terms — the ratio stays constant.

Sₙ = a₁(1 − rⁿ)/(1 − r) when r ≠ 1. When r = 1, every term equals a₁ and Sₙ = n × a₁.

Detection needs at least three terms. With only two terms, infinitely many patterns could fit.

Related calculators