Sequences & Series
A sequence is an ordered list of numbers following a pattern. A series is what you get when you add them up. The big question that drives this entire topic is deceptively simple: when you add up infinitely many numbers, can the total be finite? The answer — sometimes yes, sometimes no — is one of the most surprising results in mathematics.
Geometric Sequences
A geometric sequence multiplies by a constant ratio r at each step:
a, ar, ar^2, ar^3, …
We can plot the terms of the sequence as a continuous function to see the pattern:
- |r| < 1: The terms shrink toward zero. The sequence converges.
- |r| > 1: The terms grow without bound. The sequence diverges.
- r < 0: The terms alternate in sign, bouncing above and below zero.
- r = 1: Every term equals a. A flat sequence.
Set r = -0.8. The sequence alternates positive and negative while the absolute values shrink. Now set r = -1.1. It still alternates, but the magnitudes grow. The boundary between convergence and divergence is |r| = 1.
Partial Sums of a Geometric Series
When we add up the first n terms of a geometric sequence, we get a partial sum:
S_n = a(1 - r^n) / (1 - r)
Let’s visualize how these partial sums behave as n increases.
The blue curve shows the partial sums S_n as a function of n. The yellow horizontal line is the limit — the value the sum approaches as n goes to infinity.
- When |r| < 1, the partial sums converge to a / (1 - r).
- The smaller |r| is, the faster the convergence.
- The partial sums always stay below the limit (when a and r are positive), getting closer with each term.
The infinite geometric series formula S = a/(1-r) is used everywhere. In finance, it calculates the present value of perpetual cash flows. In physics, it sums up infinite reflections of light between mirrors. In computer science, it analyzes the total work in recursive algorithms.
When r is Closer to 1
The closer r is to 1, the more terms you need before the partial sums get close to the limit. Let’s compare different ratios.
With r = 0.3, the sum practically reaches its limit within 5 terms. With r = 0.95, you need nearly 50 terms to get close. And the limits themselves are very different: a/(1-0.3) is about 1.43, while a/(1-0.95) is 20.
Divergence: When |r| >= 1
When |r| >= 1, the terms do not shrink, so the sum grows without bound. The series diverges.
The curve shoots upward with no sign of leveling off. There is no finite limit. The sum grows forever.
Set r = 1. The geometric series becomes a + a + a + a + …, which just grows linearly. Even when r = 1 exactly — not greater, not less — the series still diverges. You need r to be strictly between -1 and 1 for convergence.
The Harmonic Series: A Surprising Divergence
The harmonic series is: 1 + 1/2 + 1/3 + 1/4 + 1/5 + …
Each term gets smaller and approaches zero. You might expect the sum to converge. It does not. The harmonic series diverges — it just does so incredibly slowly.
The red curve approximates the harmonic partial sums (using the well-known approximation H_n is roughly ln(n) + 0.5772). It keeps creeping upward, never leveling off. The blue geometric series with r = 0.5 levels off at 2 for comparison.
The harmonic series grows so slowly that you need about 10^43 terms to reach a partial sum of 100. But it does eventually surpass any number you name — that is what divergence means. This slow divergence appears in many areas of mathematics and computer science, particularly in the analysis of algorithms.
Arithmetic Series
An arithmetic sequence adds a constant difference d at each step: a, a+d, a+2d, a+3d, …
The sum of the first n terms is:
S_n = n/2 * (2a + (n-1)d)
The green line shows the terms growing linearly, while the blue curve shows the partial sums growing quadratically. Arithmetic series always diverge (unless d = 0 and a = 0), but their partial sums have a nice closed-form formula.
Challenge: The story goes that young Gauss was asked to add 1 + 2 + 3 + … + 100. He instantly answered 5050. Using the arithmetic series formula with a = 1, d = 1, n = 100, verify his answer. Then generalize: what is 1 + 2 + 3 + … + n in closed form?