Sequences & Vectors

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, …

First term a1
0.53
Common ratio r0.5
-1.51.5
an=10.5na_n = 1 \cdot 0.5^n

We can plot the terms of the sequence as a continuous function to see the pattern:

123456789101112131415-3-2-112345
Try This

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.

First term a1
0.53
Ratio r (convergent)0.5
0.050.95
Sn=1(10.5n)10.5S=110.5S_n = \frac{ 1(1 - 0.5^n)}{1 - 0.5} \quad \to \quad S_\infty = \frac{ 1 }{1 - 0.5 }
1234567891011121314151617181920123456S_n (partial sum)S_infinity (limit)

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.

Connection

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.

5101520253035404550510152025r = 0.3r = 0.7r = 0.9r = 0.95

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.

Ratio r (divergent)1.1
11.5
51015205101520253035404550

The curve shoots upward with no sign of leveling off. There is no finite limit. The sum grows forever.

Try This

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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495012345678approx H_n (ln(n) + gamma)geometric (r=0.5) for comparison

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.

Connection

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)

First term a1
15
Common difference d1
0.53
Sn=00(21+(n1)1)S_n = \frac00(2 \cdot 1 + (n-1) \cdot 1)
101020304050607080S_n (arithmetic)a_n (terms)

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

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?

Take the Quiz