Ordered lists of numbers following patterns. Arithmetic and geometric sequences.
Self-serve tutorial - low prerequisites, straightforward concepts.
Many “patterns” in math become clearer the moment you stop thinking of them as a pile of numbers and start thinking of them as a function: you feed in an index n, and out comes the n-th term aₙ. That shift is what sequences are about.
A sequence is an ordered list of numbers where each term has an index n and a value aₙ. Two foundational families are arithmetic sequences (constant difference d) and geometric sequences (constant ratio r). You can describe sequences explicitly (aₙ as a formula in n) or recursively (each term from previous ones).
In programming, you often handle arrays, lists, streams, and time series. In mathematics, a sequence is the clean, precise version of that idea: an ordered list where order is not optional—it is the point.
A big payoff of learning sequences early is that they become the common language for later topics:
A sequence is a function whose input is an index and whose output is a number.
Most commonly, indices come from the positive integers:
We write the value at index n as aₙ (read “a sub n”).
So you can think of a sequence as:
You’ll also see sequences written as an ordered list:
The parentheses emphasize order: (1, 2) ≠ (2, 1).
Different fields start counting at different places:
Both are valid. What matters is that you declare your indexing.
Example:
Many sequences follow a simple rule, but a sequence can be any mapping from indices to values. For instance:
This lesson focuses on two foundational “patterned” types:
| Term | Meaning |
|---|---|
| index n | position in the sequence |
| term aₙ | value at position n |
| explicit formula | aₙ written directly as a function of n |
| recursive definition | aₙ defined using earlier terms |
This vocabulary will matter when you later learn recurrence relations and series.
If you watch how something changes over time and the change is constant, you are in arithmetic-sequence territory.
Examples in the real world:
The defining idea is: each step adds the same amount.
A sequence (aₙ) is arithmetic if the difference between consecutive terms is constant:
Here d is the common difference.
Suppose a₁ = 5 and d = 3.
| n | aₙ |
|---|---|
| 1 | 5 |
| 2 | 8 |
| 3 | 11 |
| 4 | 14 |
Each time n increases by 1, the value increases by 3.
If you know the first term a₁ and the common difference d, you can compute any term without listing all previous ones.
Start from the pattern:
So in general:
This is worth deriving carefully because it’s the template for many later topics.
Derivation (showing the work):
We are adding d repeatedly:
So:
Given terms a₁, a₂, a₃, … compute consecutive differences:
If all Δₙ are equal, the sequence is arithmetic.
Example:
Differences: 5, 5, 5, … ⇒ arithmetic with d = 5.
If aₙ = a₁ + (n − 1)d, that’s linear in n:
So arithmetic sequences are essentially “linear growth” indexed by integers.
You will frequently want:
For an arithmetic sequence, there is a famous formula:
Why this is true (pairing idea):
Write the sum forward and backward:
Sₙ = a₁ + a₂ + … + aₙ₋₁ + aₙ
Sₙ = aₙ + aₙ₋₁ + … + a₂ + a₁
Add them termwise:
2Sₙ = (a₁ + aₙ) + (a₂ + aₙ₋₁) + … + (aₙ + a₁)
Each pair equals (a₁ + aₙ), and there are n pairs:
2Sₙ = n(a₁ + aₙ)
Divide by 2:
Sₙ = n(a₁ + aₙ)/2
You can also substitute aₙ = a₁ + (n − 1)d if you want Sₙ in terms of a₁, d, n.
Not every “nice-looking” sequence is arithmetic.
Example:
Differences: 1, 2, 3, 4, … not constant ⇒ not arithmetic.
This is a key habit: check the differences rather than guessing.
If something changes by a constant percentage (or constant factor), you get multiplicative growth or decay.
Examples:
The defining idea is: each step multiplies by the same factor.
A sequence (aₙ) is geometric if the ratio between consecutive terms is constant:
Here r is the common ratio.
Suppose a₁ = 3 and r = 2.
| n | aₙ |
|---|---|
| 1 | 3 |
| 2 | 6 |
| 3 | 12 |
| 4 | 24 |
Each step doubles.
From the pattern:
So in general:
Derivation (showing the work):
You multiply by r repeatedly:
So:
Compute ratios:
If all ρₙ are equal (and denominators aren’t 0), it’s geometric.
Example:
Ratios: 1/3, 1/3, 1/3, … ⇒ geometric with r = 1/3.
Example: a₁ = 2, r = −3 ⇒ (2, −6, 18, −54, …)
Let:
For geometric sequences (r ≠ 1):
Derivation (showing the work):
Start with:
Sₙ = a₁ + a₁r + a₁r² + … + a₁rⁿ⁻¹
Multiply both sides by r:
rSₙ = a₁r + a₁r² + … + a₁rⁿ
Subtract:
Sₙ − rSₙ = (a₁ + a₁r + … + a₁rⁿ⁻¹) − (a₁r + … + a₁rⁿ)
Everything cancels except the first term a₁ and the last term −a₁rⁿ:
(1 − r)Sₙ = a₁ − a₁rⁿ
Factor:
(1 − r)Sₙ = a₁(1 − rⁿ)
Divide:
Sₙ = a₁(1 − rⁿ)/(1 − r)
(If r = 1, then Sₙ = n a₁.)
If |r| < 1, then rⁿ → 0 as n → ∞, and the sums approach a finite limit:
You’ll revisit this idea later in generating functions and Taylor series.
Sequences are often described in one of two styles:
1) Explicit: aₙ is given directly in terms of n.
2) Recursive: aₙ is given in terms of previous terms.
Recursive definitions are natural in algorithms (“do the next step from the previous step”) and in discrete math (“build the next object from smaller ones”). This is the doorway to:
Arithmetic and geometric sequences are special because their “change rule” is constant:
| Type | What stays constant? | Growth feel |
|---|---|---|
| arithmetic | difference aₙ − aₙ₋₁ = d | linear |
| geometric | ratio aₙ / aₙ₋₁ = r | exponential |
This isn’t just classification—it helps you choose tools.
If you sample a function at integer points, you get a sequence:
Examples:
Later, you’ll often package multiple sequences into a vector sequence, like xₙ ∈ ℝᵏ.
For example, a 2D position over time:
Even here, the same patterns can apply:
You won’t need this vector form yet, but it shows how sequences generalize cleanly.
Those abilities are exactly the prerequisites for recurrence relations, generating functions, and series.
Given the sequence (4, 1, −2, −5, …), determine whether it is arithmetic or geometric, and find a formula for aₙ (assume indexing starts at n = 1).
Compute consecutive differences:
a₂ − a₁ = 1 − 4 = −3
a₃ − a₂ = (−2) − 1 = −3
a₄ − a₃ = (−5) − (−2) = −3
The differences are constant (all are −3), so the sequence is arithmetic with common difference d = −3.
Use the arithmetic explicit formula:
aₙ = a₁ + (n − 1)d
Substitute a₁ = 4 and d = −3:
aₙ = 4 + (n − 1)(−3)
aₙ = 4 − 3(n − 1)
aₙ = 4 − 3n + 3
aₙ = 7 − 3n
Check quickly:
a₁ = 7 − 3(1) = 4 ✔
a₂ = 7 − 3(2) = 1 ✔
a₃ = 7 − 3(3) = −2 ✔
Insight: Constant differences signal linear behavior: aₙ ends up being a linear expression in n.
A bacteria culture triples every hour. At hour 1, there are 500 bacteria. Model this as a geometric sequence and compute the total bacteria count added over the first 6 hours (i.e., S₆ = a₁ + … + a₆).
Tripling each hour means a constant ratio r = 3. Given a₁ = 500.
Write the explicit formula for a geometric sequence:
aₙ = a₁ rⁿ⁻¹
Substitute:
aₙ = 500 · 3ⁿ⁻¹
Compute S₆ using the geometric sum formula (r ≠ 1):
Sₙ = a₁(1 − rⁿ)/(1 − r)
So:
S₆ = 500(1 − 3⁶)/(1 − 3)
Compute 3⁶ = 729:
S₆ = 500(1 − 729)/(−2)
S₆ = 500(−728)/(−2)
S₆ = 500 · 364
S₆ = 182000
Sanity check by listing terms:
a₁ = 500
a₂ = 1500
a₃ = 4500
a₄ = 13500
a₅ = 40500
a₆ = 121500
Sum = 500 + 1500 + 4500 + 13500 + 40500 + 121500 = 182000 ✔
Insight: Geometric sums look messy if you add term-by-term, but multiplying by r and subtracting makes almost everything cancel.
A sequence is defined recursively by a₁ = 10 and aₙ = aₙ₋₁ + 4 for n ≥ 2. Find an explicit formula for aₙ and compute a₁₂.
Recognize that aₙ = aₙ₋₁ + 4 means the difference is constant: d = 4. So it is arithmetic.
Use the arithmetic explicit form:
aₙ = a₁ + (n − 1)d
Substitute a₁ = 10 and d = 4:
aₙ = 10 + (n − 1)4
aₙ = 10 + 4n − 4
aₙ = 4n + 6
Compute a₁₂:
a₁₂ = 4(12) + 6 = 48 + 6 = 54
Quick recursive check (optional): each step adds 4, so after 11 steps you added 11·4 = 44; 10 + 44 = 54 ✔
Insight: Recursive arithmetic sequences unwrap into “start + (number of steps)·(step size)”, which becomes a₁ + (n − 1)d.
A sequence is a function from indices to values; aₙ means “the term at index n”.
Order matters: (a₁, a₂, a₃, …) is not just a set of numbers.
Arithmetic sequences have constant difference: aₙ − aₙ₋₁ = d, leading to aₙ = a₁ + (n − 1)d.
Geometric sequences have constant ratio: aₙ / aₙ₋₁ = r, leading to aₙ = a₁ rⁿ⁻¹.
To detect arithmetic vs geometric from data: check differences vs ratios.
Sum formulas: arithmetic Sₙ = n(a₁ + aₙ)/2; geometric (r ≠ 1) Sₙ = a₁(1 − rⁿ)/(1 − r).
Explicit forms let you jump to aₙ directly; recursive forms describe step-by-step generation and lead into recurrence relations.
Mixing up indexing (starting at n = 0 vs n = 1), causing off-by-one errors in formulas like aₙ = a₁ rⁿ⁻¹.
Assuming a sequence is arithmetic because the numbers “look linear” without actually checking differences.
Trying to check geometric behavior by differences instead of ratios (or forgetting ratios fail when a term is 0).
Using the geometric sum formula when r = 1 (it would divide by 0); in that case Sₙ = n a₁.
Determine whether (−1, 2, −4, 8, −16, …) is arithmetic or geometric. Find aₙ.
Hint: Try ratios aₙ/aₙ₋₁. Watch the sign.
Compute ratios:
2/(−1) = −2
(−4)/2 = −2
8/(−4) = −2
Constant ratio r = −2 ⇒ geometric.
With a₁ = −1:
aₙ = a₁ rⁿ⁻¹ = (−1)(−2)ⁿ⁻¹.
An arithmetic sequence has a₃ = 12 and a₁₀ = 40. Find a₁ and d, then write aₙ.
Hint: Use aₙ = a₁ + (n − 1)d to set up two equations.
Use aₙ = a₁ + (n − 1)d.
a₃ = a₁ + 2d = 12
a₁₀ = a₁ + 9d = 40
Subtract the first from the second:
(a₁ + 9d) − (a₁ + 2d) = 40 − 12
7d = 28
d = 4
Then a₁ + 2(4) = 12 ⇒ a₁ + 8 = 12 ⇒ a₁ = 4.
So aₙ = 4 + (n − 1)4 = 4n.
A geometric sequence has a₂ = 6 and a₅ = 48. Find a₁ and r, then compute S₅.
Hint: Write a₂ = a₁r and a₅ = a₁r⁴. Divide the equations to eliminate a₁.
Given:
a₂ = a₁r = 6
a₅ = a₁r⁴ = 48
Divide the second by the first:
a₅/a₂ = (a₁r⁴)/(a₁r) = r³
So:
48/6 = r³
8 = r³
r = 2
Then a₁r = 6 ⇒ a₁(2) = 6 ⇒ a₁ = 3.
Now compute S₅ (r ≠ 1):
S₅ = a₁(1 − r⁵)/(1 − r)
= 3(1 − 2⁵)/(1 − 2)
= 3(1 − 32)/(−1)
= 3(−31)/(−1)
= 93.
(Checks: terms are 3, 6, 12, 24, 48; sum = 93.)
Next nodes you can unlock and why they rely on sequences:
Related foundational ideas (optional exploration later):