Sequence Calculator
Find the nth term and partial sum of an arithmetic or geometric sequence, compute Fibonacci or Lucas numbers exactly for huge n, or solve a custom order-2 linear recurrence — with the explicit formula and every step shown.
Written by Suhaib Hassan. Every formula is re-derived and checked by hand. Our methodology.
Arithmetic and geometric sequences use their closed-form formulas directly; Fibonacci/Lucas and custom recurrences use exact BigInt fast-doubling / matrix exponentiation, so even the 1000th term is exact, not approximate.
It shows the explicit closed-form formula alongside the recursive definition, so you can see how one implies the other.
—
First terms of the sequence
The trajectory of aₙ as n increases.
Step-by-step working
—
Sequence formulas at a glance
The core identities behind each mode.
| Sequence | nth term | Sum of first n terms |
|---|---|---|
| Arithmetic | aₙ = a₁ + (n−1)d | Sₙ = n/2·(a₁ + aₙ) |
| Geometric (r ≠ 1) | aₙ = a₁·rn−1 | Sₙ = a₁(1 − rⁿ)/(1 − r) |
| Fibonacci | Fₙ = Fₙ₋₁ + Fₙ₋₂ | F₀=0, F₁=1 |
| Lucas | Lₙ = Lₙ₋₁ + Lₙ₋₂ | L₀=2, L₁=1 |
What is a sequence?
A sequence is an ordered list of numbers a₁, a₂, a₃, … generated by a rule. An arithmetic sequence adds a fixed amount each step; a geometric sequence multiplies by a fixed ratio; Fibonacci and Lucas numbers are defined recursively, each term the sum of the two before it.
By Suhaib Hassan · Reviewed 29 September 2026 · How CalculatePilot verifies formulas →
Sources
- Graham, R. L., Knuth, D. E., & Patashnik, O. (1994). Concrete Mathematics (2nd ed.). Addison-Wesley, chapter 6.
- Koshy, T. (2001). Fibonacci and Lucas Numbers with Applications. Wiley-Interscience.
- ISO 80000-2:2019, clause 4 (sequences and series notation).
Frequently asked questions
What's the difference between a sequence and a series?
A sequence is the ordered list of terms itself (a₁, a₂, a₃, …). A series is the sum of those terms (a₁ + a₂ + a₃ + … + aₙ). This calculator's "partial sum" is the series formed from the first n terms of the sequence.
When does a geometric series converge as n → ∞?
Exactly when |r| < 1. The infinite sum then equals a₁ / (1 − r). If |r| ≥ 1, the terms don't shrink to zero and the sum diverges (grows without bound, or oscillates).
How are huge Fibonacci numbers computed exactly?
By fast doubling: identities like F(2k) = F(k)·[2F(k+1) − F(k)] let you compute F(n) in about log₂(n) big-integer steps instead of n additions, and BigInt arithmetic keeps every digit exact, however large.
What is the golden ratio's connection to Fibonacci numbers?
The ratio of consecutive Fibonacci numbers Fₙ₊₁/Fₙ converges to the golden ratio φ = (1+√5)/2 ≈ 1.6180339887 as n grows — this calculator shows how quickly that ratio settles.
What does a "custom recurrence" mean here?
A second-order linear recurrence aₙ = p·aₙ₋₁ + q·aₙ₋₂, defined by two seed values and two coefficients. Fibonacci (p=q=1, seeds 0,1) and Lucas (p=q=1, seeds 2,1) are special cases; changing p, q or the seeds produces other well-known families, such as the Pell numbers (p=2, q=1).
Can n be very large?
Yes — arithmetic and geometric terms compute instantly for any n; Fibonacci, Lucas and custom recurrences use exact BigInt arithmetic up to n = 5000, computed with fast doubling or matrix exponentiation rather than a slow term-by-term loop.
Related calculators
Continue with algebra and number theory.