Number Sequence Calculator
Generate arithmetic and geometric sequences, find the nth term, and compute the sum of the first n terms. Enter the first term and either the common difference (arithmetic) or common ratio (geometric), and the calculator produces the full list with the formula for each term.
Configure the sequence
Configure the sequence and press Generate.
Sequence formulas
Arithmetic sequence
aₙ = a₁ + (n − 1)·d
Sum of first n terms: Sₙ = n · (a₁ + aₙ) / 2
Each term differs from the previous one by a constant value d, called the common difference. Examples: 2, 5, 8, 11, 14, … (d = 3).
Geometric sequence
aₙ = a₁ · r^(n − 1)
Sum of first n terms: Sₙ = a₁ · (1 − rⁿ) / (1 − r), r ≠ 1
Each term is the previous term multiplied by a constant r, called the common ratio. Examples: 3, 6, 12, 24, 48, … (r = 2).
| Symbol | Meaning |
|---|---|
a₁ | First term |
d | Common difference (arithmetic) |
r | Common ratio (geometric) |
n | Number of terms or position index |
aₙ | nth term |
Sₙ | Sum of first n terms |
Worked examples
Example 1 — Arithmetic
a₁ = 2, d = 3, n = 6.
Sequence: 2, 5, 8, 11, 14, 17. a₆ = 17, S₆ = 6 · (2 + 17) / 2 = 57.
a₆ = 17, S₆ = 57
Example 2 — Geometric
a₁ = 1, r = 2, n = 8.
Sequence: 1, 2, 4, 8, 16, 32, 64, 128. a₈ = 128, S₈ = 255.
a₈ = 128, S₈ = 255
Example 3 — Decreasing arithmetic
a₁ = 100, d = −7, n = 5.
Sequence: 100, 93, 86, 79, 72. a₅ = 72, S₅ = 430.
a₅ = 72, S₅ = 430
Related calculators
Frequently asked questions
Subtract consecutive terms — if the differences are equal, it's arithmetic. Divide consecutive terms — if the ratios are equal, it's geometric. Some sequences are neither.
Yes. A negative ratio makes the terms alternate in sign. For example, a₁ = 1, r = −2 gives 1, −2, 4, −8, 16, …
If r = 1, every term equals a₁ and the sum is simply n · a₁. The general geometric sum formula divides by (1 − r), which would be zero, so the calculator uses the special case directly.