Sequence Calculator

Analyze arithmetic and geometric sequences. Find nth term, sum of first n terms, and visualize the progression.

Arithmetic Sequence: aₙ = a₁ + (n-1)·d , Sₙ = n/2 · (a₁ + aₙ)

Geometric Sequence: aₙ = a₁ · r⁽ⁿ⁻¹⁾ , Sₙ = a₁·(1 - rⁿ)/(1 - r) (r≠1)

Arithmetic: 3,5,7,9... Geometric: 2,4,8,16... Arithmetic (negative d): 10,7,4,1... Geometric: 100,50,25,...

Understanding Sequences

A sequence is an ordered list of numbers following a specific rule. Two fundamental types in mathematics are arithmetic and geometric sequences. They appear in finance, physics, computer science, and daily life.

Arithmetic vs Geometric Sequences

Feature Arithmetic Sequence Geometric Sequence
Definition Each term is obtained by adding a constant common difference (d) to the previous term. Each term is obtained by multiplying the previous term by a constant common ratio (r).
Recursive Formula aₙ = aₙ₋₁ + d aₙ = aₙ₋₁ · r
Explicit Formula (nth term) aₙ = a₁ + (n‑1)d aₙ = a₁ · r⁽ⁿ⁻¹⁾
Sum of First n Terms (Sₙ) Sₙ = n/2 · (a₁ + aₙ) = n/2 · [2a₁ + (n‑1)d] Sₙ = a₁·(1 - rⁿ)/(1 - r) (r ≠ 1)
If r = 1, Sₙ = n·a₁
Infinite Sum (if exists) Only converges if d = 0 (constant sequence); otherwise diverges. Converges to a₁/(1‑r) only when |r| < 1.
Graph Shape Points lie on a straight line (linear). Points follow exponential growth/decay.
Common Examples Monthly savings of $100: 100, 200, 300, … Population doubling: 2, 4, 8, 16, …

? Key Insight: The arithmetic sequence models constant rate of change, while the geometric sequence models constant relative (percentage) change.

Detailed Explanations

Arithmetic Sequences

If you start with a first term \(a_1\) and add the same value \(d\) repeatedly, you get an arithmetic progression. Example: \(3, 7, 11, 15, \dots\) has \(a_1 = 3\) and \(d = 4\). The 10th term is \(a_{10} = 3 + 9·4 = 39\). The sum of the first 10 terms can be computed quickly using the formula \(S_{10} = \frac{10}{2}(3 + 39) = 5·42 = 210\).

Geometric Sequences

When you multiply by a fixed ratio \(r\), the sequence grows or decays exponentially. Example: \(2, 6, 18, 54, \dots\) has \(a_1 = 2\) and \(r = 3\). The 6th term is \(2·3^{5} = 2·243 = 486\). The sum of the first 6 terms is \(S_6 = 2·(1-3^6)/(1-3) = 2·(1-729)/(-2) = 728\).

Infinite Geometric Series

If \(|r| < 1\), the terms become smaller and smaller, and the sum of infinitely many terms converges to a finite number: \[ S_{\infty} = \frac{a_1}{1 - r} \] For instance, \(100, 50, 25, 12.5, \dots\) with \(a_1=100, r=0.5\) has an infinite sum of \(100/(1-0.5) = 200\). This concept is crucial in physics (Zeno's paradox), finance (perpetuities), and signal processing.

✨ Calculator Features (Verified):

  • ✅ Correct handling of negative, fractional, and zero common difference/ratio.
  • ✅ Special case r = 1 (constant geometric sequence) properly detected – sum becomes n·a₁.
  • ✅ Uses math.js for arbitrary precision – no floating‑point surprises.
  • ✅ Generates terms up to n = 1000 (display truncated but sums accurate).
  • ✅ Visual scatter plot helps identify linear (arithmetic) vs exponential (geometric) patterns.

Frequently Asked Questions

If r = 1, the sequence is constant: every term equals a₁. The sum of the first n terms is simply n·a₁. Our calculator detects this case (|r‑1| < 1e-12) and uses the correct formula.

Yes, you can enter any n up to 1000. For performance, the visual list may be limited, but the nth term and sum are always calculated precisely.

  • Arithmetic: calculating monthly rent increases, scoring in bowling (frames), distance traveled at constant speed increments.
  • Geometric: compound interest, population growth, radioactive decay, depreciation of assets.