Skip to content
The Lumenary
Grades 9–12Ages 15–18 75 min

Sequences and series

Adding up infinitely many numbers can give a finite answer — 1+12+14+⋯=21 + \tfrac12 + \tfrac14 + \cdots = 2 — or no answer at all, even when the numbers being added shrink to nothing.

Formally verified · 16 LeanComputationally tested · 2 PythonAI-drafted · awaiting human reviewMathematically reviewed: Awaiting human review

Your guides: Chloe, Margaret, Gideon

MotivationH

Can you add forever?

The Greek philosopher Zeno of Elea (5th century BCE) posed a puzzle. To walk across a room 2 metres wide, you must first walk 1 metre, then half of the remaining metre, then half of what remains, and so on — infinitely many steps:

1+12+14+18+⋯1 + \frac12 + \frac14 + \frac18 + \cdots

Infinitely many positive distances: surely they add up to an infinite distance, and you never arrive? Yet people cross rooms every day.

Adding long lists of numbers is much older than Zeno. Problem 79 of the Egyptian Rhind papyrus (about 1550 BCE) adds 7+49+343+2401+168077 + 49 + 343 + 2401 + 16807 — seven houses, each with seven cats, each catching seven mice, and so on. Today the same arithmetic appears in savings that earn interest, in medicine doses that decay in the body, and in the decimal expansion of every number.

In this lesson we learn to add such lists — finite ones exactly, infinite ones by a limit — and find out when an infinite sum makes sense. Zeno's sum, we will prove, is exactly 22.

IntuitionH

Running totals that settle down

A sequence is an infinite list of numbers, a1,a2,a3,…a_1, a_2, a_3, \dots. A series is what you get by adding the terms one by one and keeping a running total. For Zeno's walk the running totals are

1,112,134,178,11516,…1, \quad 1\tfrac12, \quad 1\tfrac34, \quad 1\tfrac78, \quad 1\tfrac{15}{16}, \quad \dots

Each is short of 22 by exactly the last step taken: 1,12,14,18,…1, \tfrac12, \tfrac14, \tfrac18, \dots The gap halves every time. It never becomes zero, but it becomes smaller than any distance you care to name — smaller than a millimetre after 1111 steps, smaller than the width of an atom after about 3535. That is what we will mean by "the infinite sum is 22": not that someone finishes infinitely many additions, but that the running totals close in on 22 and on nothing else.

1/21/41/81/16
Half of a unit square, then a quarter, then an eighth, … Every piece is half of what is left, and the pieces fill the whole square: $\tfrac12 + \tfrac14 + \tfrac18 + \cdots = 1$. Adding the first step of Zeno's walk gives $1 + \tfrac12 + \tfrac14 + \cdots = 2$.
DefinitionsH

Definitions

Definition— sequence

A sequence of real numbers is a function that assigns a real number ana_n to each positive integer nn (sometimes to each n≥0n \ge 0). We write it (an)(a_n) or a1,a2,a3,…a_1, a_2, a_3, \dots A sequence may be given by a formula, such as an=1na_n = \tfrac1n, or recursively, by giving the first term(s) and a rule for each term in terms of earlier ones, such as a1=1a_1 = 1, an+1=2an+1a_{n+1} = 2a_n + 1.

Definition— arithmetic and geometric sequences

A sequence is arithmetic if consecutive terms have a constant difference dd: an+1=an+da_{n+1} = a_n + d, so an=a+(n−1)da_n = a + (n - 1)d with a=a1a = a_1. It is geometric if consecutive terms have a constant ratio rr: an+1=r ana_{n+1} = r\,a_n, so an=a rn−1a_n = a\,r^{n-1}.

Definition— summation notation

∑k=1nak=a1+a2+⋯+an\displaystyle\sum_{k=1}^{n} a_k = a_1 + a_2 + \dots + a_n. The letter kk is a "dummy" index: ∑k=1nk2\sum_{k=1}^{n} k^2 and ∑j=1nj2\sum_{j=1}^{n} j^2 mean the same thing. For example ∑k=15k2=1+4+9+16+25=55\sum_{k=1}^{5} k^2 = 1 + 4 + 9 + 16 + 25 = 55.

Definition— limit of a sequence

A sequence (sn)(s_n) converges to LL (or tends to LL), written sn→Ls_n \to L or lim⁡n→∞sn=L\lim_{n\to\infty} s_n = L, if for every tolerance ε>0\varepsilon > 0 there is an index NN such that ∣sn−L∣<ε|s_n - L| < \varepsilon for all n≥Nn \ge N. In words: eventually every term is within ε\varepsilon of LL, however small ε\varepsilon is. Otherwise the sequence diverges.

Definition— series and partial sums

Given a sequence (ak)(a_k), its partial sums are Sn=a1+⋯+anS_n = a_1 + \dots + a_n. The series ∑k=1∞ak\sum_{k=1}^{\infty} a_k converges to SS, and we write ∑k=1∞ak=S\sum_{k=1}^{\infty} a_k = S, if Sn→SS_n \to S. If the partial sums have no limit, the series diverges.

So an infinite sum is not an infinite act of adding; it is the limit of finite sums. The limit laws you may know from Introductory calculus hold for sequences too: limits of sums, products and constant multiples are the sums, products and multiples of the limits.

Worked examplesH

Worked examples

Example— Arithmetic sequences

The seats in a stadium in Lagos are arranged so that the first row has 3030 seats and each row has 44 more than the one in front: an=30+4(n−1)a_n = 30 + 4(n - 1). Row 2525 has a25=126a_{25} = 126 seats. By the formula proved below, the first 2525 rows hold 25(30+126)2=1950\tfrac{25(30 + 126)}{2} = 1950 seats: number of rows times the average of the first and last row.

Example— Geometric sequences

  • A medicine with a half-life of one day: if 8080 mg are in the body today, then 80⋅(12)n80 \cdot (\tfrac12)^{n} mg remain after nn days — a geometric sequence with ratio 12\tfrac12.
  • Savings of 10001000 rupees earning 5%5\% a year grow to 1000⋅1.05n1000 \cdot 1.05^{n} rupees after nn years: ratio 1.051.05.
  • 3,−6,12,−24,…3, -6, 12, -24, \dots has ratio −2-2: the signs alternate and the sizes double.

Example— A recursive sequence

The Tower of Hanoi puzzle has discs of different sizes on one of three pegs; you must move the whole stack to another peg, one disc at a time, never putting a larger disc on a smaller one. To move n+1n + 1 discs, you must move the top nn out of the way, move the largest disc, and move the nn back on top. So the least number of moves hnh_n satisfies

h0=0,hn+1=2hn+1,h_0 = 0, \qquad h_{n+1} = 2h_n + 1,

giving 0,1,3,7,15,31,…0, 1, 3, 7, 15, 31, \dots The pattern suggests hn=2n−1h_n = 2^n - 1, and induction proves it: hn+1+1=2hn+2=2(hn+1)=2⋅2nh_{n+1} + 1 = 2h_n + 2 = 2(h_n + 1) = 2 \cdot 2^n. Another famous recursion, Fn+2=Fn+1+FnF_{n+2} = F_{n+1} + F_n, gives the sequence 1,1,2,3,5,8,…1, 1, 2, 3, 5, 8, \dots, studied by Indian scholars of poetic metre (Virahāṅka, Hemachandra) centuries before Fibonacci's rabbits (1202).

Example— Limits of sequences

  • 1n→0\tfrac1n \to 0: given ε>0\varepsilon > 0, choose N>1εN > \tfrac1\varepsilon; then 1n≤1N<ε\tfrac1n \le \tfrac1N < \varepsilon for n≥Nn \ge N.
  • 2n+1n=2+1n→2\tfrac{2n + 1}{n} = 2 + \tfrac1n \to 2.
  • (−1)n(-1)^n diverges: its terms jump between −1-1 and 11 and stay 22 apart, so they cannot all be within ε=12\varepsilon = \tfrac12 of a single number.
Explore

Explore: watching partial sums

The partial sums of Zeno's series ∑(12)n−1\sum (\tfrac12)^{n-1}, with the limit 22 drawn as a dashed line:

1 + 1/2 + 1/4 + ⋯

How many terms until the partial sums are within 0.001 of 2?

Examples
an =
  • partial sums Sₙ
  • terms aₙ
  • Known sum

S20 = a1 + … + a20 = 1.999998

Known sum: L = 2 · still missing: L − S20 ≈ 0.000002

Partial sums on a screen are evidence, never proof: a series can look settled and still diverge, as the harmonic series does.

Now move the ratio rr. For which values do the partial sums of 1+r+r2+⋯1 + r + r^2 + \cdots settle down? Try r=0.9r = 0.9, r=−0.9r = -0.9, r=1r = 1 and r=−1r = -1.

The geometric series 1 + r + r² + ⋯

Add the terms one by one. Do the partial sums Sₙ settle down, or keep growing?

Examples
an =
  • partial sums Sₙ
  • terms aₙ

S60 = a1 + … + a60 = 2

Partial sums on a screen are evidence, never proof: a series can look settled and still diverge, as the harmonic series does.

Finally the harmonic series 1+12+13+⋯1 + \tfrac12 + \tfrac13 + \cdots. Switch on the logarithmic axis: the partial sums keep climbing, by about the same amount each time nn is multiplied by 1010.

The harmonic series

The terms shrink to 0. Do the partial sums settle down?

Examples
an =
  • partial sums Sₙ
  • terms aₙ
  • ln n + γ

S1000 = a1 + … + a1000 = 7.485471

This is the harmonic series. Its partial sums grow without bound, but very slowly, like ln n + γ (γ ≈ 0.5772): S₁₀₀₀ ≈ 7.49, and Sₙ first passes 100 only after about 1.5 × 10⁴³ terms. The graph seems to level off; it never does.

Partial sums on a screen are evidence, never proof: a series can look settled and still diverge, as the harmonic series does.

Recursive sequences can be explored with a cobweb diagram. Iterating x↦x2+1x \mapsto \tfrac{x}{2} + 1 from any start gives a sequence converging to 22, the solution of x=x2+1x = \tfrac x2 + 1. Iterating the logistic map x↦rx(1−x)x \mapsto r x(1 - x) instead can converge, oscillate or behave chaotically depending on rr — the start of the theory of dynamical systems.

Iterating the logistic map x ↦ r x (1 − x)

Try r = 2.8, 3.2, 3.5 and 3.9.

f(x) =
x₀

Iterates xₖ against k

  • y = f(x)
  • y = x
  • cobweb path

Last iterates: x58 = 0.79946, x59 = 0.51304, x60 = 0.79946

The orbit appears to settle into a cycle of period 2: 0.513, 0.7995.

Fixed points in view (numerical): x* = 0 (repelling: |f′(x*)| > 1); x* = 0.6875 (repelling: |f′(x*)| > 1)

Based on 3,000 iterations in floating-point arithmetic: numerical evidence, not proof.

ProofH

Finite sums

Theorem— Theorem 1 (arithmetic series)

The sum of the first nn terms of the arithmetic sequence a,a+d,a+2d,…a, a + d, a + 2d, \dots is

Sn=∑k=0n−1(a+kd)=n(2a+(n−1)d)2=n (first+last)2.S_n = \sum_{k=0}^{n-1} (a + kd) = \frac{n\big(2a + (n - 1)d\big)}{2} = \frac{n\,(\text{first} + \text{last})}{2}.

Proof

Write the sum forwards and backwards and add the two lines term by term:

Sn=a+(a+d)+⋯+(a+(n−1)d),Sn=(a+(n−1)d)+(a+(n−2)d)+⋯+a.\begin{aligned} S_n &= a + (a + d) + \dots + \big(a + (n - 1)d\big), \\ S_n &= \big(a + (n - 1)d\big) + \big(a + (n - 2)d\big) + \dots + a. \end{aligned}

Each of the nn columns adds up to 2a+(n−1)d2a + (n - 1)d, so 2Sn=n(2a+(n−1)d)2S_n = n\big(2a + (n - 1)d\big).

∎

With a=d=1a = d = 1 this gives 1+2+⋯+n=n(n+1)21 + 2 + \dots + n = \tfrac{n(n + 1)}{2}. A famous story — probably embellished — tells that the young Gauss found 1+2+⋯+100=50501 + 2 + \dots + 100 = 5050 this way in seconds.

Theorem— Theorem 2 (geometric series, finite)

If r≠1r \ne 1, then for every n≥0n \ge 0

a+ar+ar2+⋯+arn−1=a(1−rn)1−r.a + ar + ar^2 + \dots + ar^{n-1} = \frac{a(1 - r^n)}{1 - r}.

Proof

Let S=1+r+⋯+rn−1S = 1 + r + \dots + r^{n-1}. Then rS=r+r2+⋯+rnrS = r + r^2 + \dots + r^n, and subtracting, every term except the first of SS and the last of rSrS cancels:

(1−r)S=1−rn.(1 - r)S = 1 - r^n.

(This "telescoping" can also be proved by induction on nn: (1−r)(S+rn)=1−rn+rn−rn+1=1−rn+1(1 - r)\big(S + r^n\big) = 1 - r^n + r^n - r^{n+1} = 1 - r^{n+1}.) Divide by 1−r≠01 - r \ne 0 and multiply by aa.

∎

For r=1r = 1 the sum is simply nana.

ProofH

Infinite series

To let n→∞n \to \infty in Theorem 2 we need to know what happens to rnr^n.

Theorem— Lemma 3 (Bernoulli's inequality)

If t≥0t \ge 0, then (1+t)n≥1+nt(1 + t)^n \ge 1 + nt for every n≥0n \ge 0.

Proof

Induction on nn. For n=0n = 0: 1≥11 \ge 1. If (1+t)n≥1+nt(1 + t)^n \ge 1 + nt, then

(1+t)n+1=(1+t)n(1+t)≥(1+nt)(1+t)=1+(n+1)t+nt2≥1+(n+1)t.(1 + t)^{n+1} = (1 + t)^n(1 + t) \ge (1 + nt)(1 + t) = 1 + (n + 1)t + nt^2 \ge 1 + (n + 1)t.

∎

Theorem— Theorem 4 (powers of a small ratio)

If ∣r∣<1|r| < 1, then rn→0r^n \to 0 as n→∞n \to \infty.

Proof

If r=0r = 0 there is nothing to prove. Otherwise 1∣r∣>1\tfrac{1}{|r|} > 1; write 1∣r∣=1+t\tfrac{1}{|r|} = 1 + t with t>0t > 0. By Lemma 3, 1∣r∣n=(1+t)n≥1+nt>nt\tfrac{1}{|r|^n} = (1 + t)^n \ge 1 + nt > nt, so

∣rn−0∣=∣r∣n<1nt.|r^n - 0| = |r|^n < \frac{1}{nt}.

Given ε>0\varepsilon > 0, choose N>1tεN > \tfrac{1}{t\varepsilon}; then ∣rn∣<1nt≤1Nt<ε|r^n| < \tfrac{1}{nt} \le \tfrac{1}{Nt} < \varepsilon for all n≥Nn \ge N.

∎

Theorem— Theorem 5 (infinite geometric series)

Let a≠0a \ne 0. If ∣r∣<1|r| < 1, then

∑k=0∞ark=a+ar+ar2+⋯=a1−r.\sum_{k=0}^{\infty} a r^k = a + ar + ar^2 + \cdots = \frac{a}{1 - r}.

If ∣r∣≥1|r| \ge 1, the series diverges.

Proof

Case ∣r∣<1|r| < 1. By Theorem 2 the nn-th partial sum is Sn=a(1−rn)1−r=a1−r−a1−r rnS_n = \tfrac{a(1 - r^n)}{1 - r} = \tfrac{a}{1 - r} - \tfrac{a}{1 - r}\,r^n. By Theorem 4, rn→0r^n \to 0, so Sn→a1−rS_n \to \tfrac{a}{1 - r}.

Case ∣r∣≥1|r| \ge 1. Then ∣ark∣=∣a∣ ∣r∣k≥∣a∣>0|ar^k| = |a|\,|r|^k \ge |a| > 0 for every kk, so the terms do not tend to 00, and the series diverges by the term test (Theorem 6 below).

∎

Example— Zeno, 0.999… and repeating decimals

  • 1+12+14+⋯1 + \tfrac12 + \tfrac14 + \cdots: a=1a = 1, r=12r = \tfrac12, sum 11−1/2=2\tfrac{1}{1 - 1/2} = 2. Zeno's walker arrives.
  • 0.999…0.999\ldots means 910+9100+91000+⋯\tfrac{9}{10} + \tfrac{9}{100} + \tfrac{9}{1000} + \cdots: a=910a = \tfrac{9}{10}, r=110r = \tfrac{1}{10}, sum 9/109/10=1\tfrac{9/10}{9/10} = 1. So 0.999…=10.999\ldots = 1 exactly: the partial sums 0.9,0.99,…0.9, 0.99, \dots fall short of 11 by 10−n10^{-n}, which tends to 00.
  • 0.272727…=27100+271002+⋯=27/1001−1/100=2799=3110.272727\ldots = \tfrac{27}{100} + \tfrac{27}{100^2} + \cdots = \tfrac{27/100}{1 - 1/100} = \tfrac{27}{99} = \tfrac{3}{11}. Every repeating decimal is a geometric series, which is why it is a fraction (compare Real numbers and irrationality).
  • 1−12+14−18+⋯1 - \tfrac12 + \tfrac14 - \tfrac18 + \cdots: r=−12r = -\tfrac12, sum 13/2=23\tfrac{1}{3/2} = \tfrac23.

Theorem— Theorem 6 (term test)

If ∑ak\sum a_k converges, then ak→0a_k \to 0. Equivalently: if the terms do not tend to 00, the series diverges.

Proof

Let Sn→SS_n \to S. Then also Sn−1→SS_{n-1} \to S (it is the same sequence, shifted by one place), so an=Sn−Sn−1→S−S=0a_n = S_n - S_{n-1} \to S - S = 0.

∎

The term test can only prove divergence. Terms tending to 00 is necessary for convergence, but not sufficient — as the most famous series of all shows.

Theorem— Theorem 7 (the harmonic series diverges)

The partial sums Hn=1+12+13+⋯+1nH_n = 1 + \tfrac12 + \tfrac13 + \dots + \tfrac1n satisfy H2m≥1+m2H_{2^m} \ge 1 + \tfrac m2 for every m≥0m \ge 0. Hence HnH_n grows without bound, and ∑k=1∞1k\sum_{k=1}^{\infty} \tfrac1k diverges, although 1k→0\tfrac1k \to 0.

Proof

Group the terms after the first into blocks that end at powers of 22:

1+12+(13+14)+(15+16+17+18)+(19+⋯+116)+⋯1 + \tfrac12 + \Big(\tfrac13 + \tfrac14\Big) + \Big(\tfrac15 + \tfrac16 + \tfrac17 + \tfrac18\Big) + \Big(\tfrac19 + \dots + \tfrac1{16}\Big) + \cdots

The block 12j+1+⋯+12j+1\tfrac{1}{2^j + 1} + \dots + \tfrac{1}{2^{j+1}} has 2j2^j terms, each at least 12j+1\tfrac{1}{2^{j+1}}, so it adds up to at least 2j⋅12j+1=122^j \cdot \tfrac{1}{2^{j+1}} = \tfrac12. The first 2m2^m terms consist of the term 11 and the mm blocks j=0,…,m−1j = 0, \dots, m - 1, so H2m≥1+m2H_{2^m} \ge 1 + \tfrac m2.

Given any number BB, choose m>2Bm > 2B; then Hn≥H2m>BH_n \ge H_{2^m} > B for all n≥2mn \ge 2^m, because the partial sums increase. So (Hn)(H_n) is unbounded and cannot converge.

∎

The divergence is extraordinarily slow: HnH_n first exceeds 1010 at n=12 367n = 12\,367 and first exceeds 100100 only after more than 104310^{43} terms. (In fact HnH_n is close to ln⁡n+0.5772…\ln n + 0.5772\ldots; see Exponential and logarithmic functions.) By contrast, squaring the denominators makes the series converge:

Theorem— Proposition 8 (the sum of 1/k² is less than 2)

For every n≥1n \ge 1:   1+14+19+⋯+1n2<2\;1 + \tfrac14 + \tfrac19 + \dots + \tfrac1{n^2} < 2.

Proof

For k≥2k \ge 2, 1k2<1k(k−1)=1k−1−1k\tfrac{1}{k^2} < \tfrac{1}{k(k - 1)} = \tfrac{1}{k - 1} - \tfrac1k. Adding these for k=2,…,nk = 2, \dots, n, the right-hand sides telescope:

∑k=1n1k2<1+(1−12)+(12−13)+⋯+(1n−1−1n)=2−1n<2.\sum_{k=1}^{n}\frac{1}{k^2} < 1 + \Big(1 - \tfrac12\Big) + \Big(\tfrac12 - \tfrac13\Big) + \dots + \Big(\tfrac1{n-1} - \tfrac1n\Big) = 2 - \tfrac1n < 2.

(For n=1n = 1 the sum is 1<21 < 2.)

∎

The partial sums of ∑1k2\sum \tfrac{1}{k^2} increase and stay below 22; the completeness of the real numbers (an increasing sequence that is bounded above converges) then guarantees that the series converges. Its sum, π26≈1.6449\tfrac{\pi^2}{6} \approx 1.6449, was found by Euler in 1734 — the "Basel problem".

Formal mathematicsF

Series in Lean

In Mathlib a sequence is a function ℕ → ℝ, starting at index 00, and ∑ k ∈ range n, f k is f(0)+⋯+f(n−1)f(0) + \dots + f(n - 1) — the first nn terms. HasSum f S means the series ∑f(k)\sum f(k) converges to SS, and Summable f that it converges to something.

First the finite sums: Theorem 1 and the telescoping of Theorem 2, both by induction, and the closed form (with Mathlib's version for comparison):

arith_sumLean 4Proved here from basic factsFormally verified
/-- **Sum of an arithmetic progression.** The first `n` terms of `a, a + d, a + 2d, …` add up to
`n(2a + (n − 1)d)/2`: "number of terms times the average of the first and last". Proved by
induction on `n`. -/
theorem arith_sum (a d : ℝ) (n : ℕ) :
    ∑ k ∈ range n, (a + k * d) = n * (2 * a + (n - 1) * d) / 2 := by
  induction n with
  | zero => simp
  | succ m ih =>
    rw [sum_range_succ, ih]
    push_cast
    ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor
geom_telescopeLean 4Proved here from basic factsFormally verified
/-- **The telescoping step.** `(1 − r)(1 + r + ⋯ + rⁿ⁻¹) = 1 − rⁿ`: multiplying by `1 − r`
makes every middle term cancel. Proved by induction on `n`. -/
theorem geom_telescope (r : ℝ) (n : ℕ) : (1 - r) * ∑ k ∈ range n, r ^ k = 1 - r ^ n := by
  induction n with
  | zero => simp
  | succ m ih =>
    rw [sum_range_succ, mul_add, ih, pow_succ]
    ring
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor
geom_sumLean 4Proved here from basic factsFormally verified
/-- **Finite geometric sum.** For `r ≠ 1`, `a + ar + ⋯ + arⁿ⁻¹ = a(1 − rⁿ)/(1 − r)`:
divide the telescoping identity by `1 − r ≠ 0`. -/
theorem geom_sum (a r : ℝ) (hr : r ≠ 1) (n : ℕ) :
    ∑ k ∈ range n, a * r ^ k = a * (1 - r ^ n) / (1 - r) := by
  have h1 : 1 - r ≠ 0 := sub_ne_zero.mpr (Ne.symm hr)
  rw [← mul_sum, ← geom_telescope r n]
  field_simp
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor
geom_sum_libraryLean 4Applies a library theoremFormally verified
/-- The same sum in Mathlib's form `(rⁿ − 1)/(r − 1)`, from `geom_sum_eq`, which holds in every
division ring. -/
theorem geom_sum_library (r : ℝ) (hr : r ≠ 1) (n : ℕ) :
    ∑ k ∈ range n, r ^ k = (r ^ n - 1) / (r - 1) :=
  geom_sum_eq hr n
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor

The Tower of Hanoi recursion, as a Lean definition by pattern matching, and its closed form:

hanoiLean 4Formally verified
/-- The **Tower of Hanoi numbers**, defined recursively: no moves for `0` discs, and to move
`n + 1` discs, move `n` discs aside, move the largest disc, and move the `n` discs back on top:
`h(n + 1) = 2 h(n) + 1`. -/
def hanoi : ℕ → ℕ
  | 0 => 0
  | n + 1 => 2 * hanoi n + 1
Axioms used: No axiomsformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor
hanoi_formulaLean 4Proved here from basic factsFormally verified
/-- **A closed form for the recursion:** `h(n) + 1 = 2ⁿ`, i.e. `h(n) = 2ⁿ − 1`. Induction:
`h(n + 1) + 1 = 2h(n) + 2 = 2(h(n) + 1) = 2 · 2ⁿ`. (Stated with `+ 1` to avoid natural-number
subtraction.) -/
theorem hanoi_formula (n : ℕ) : hanoi n + 1 = 2 ^ n := by
  induction n with
  | zero => rfl
  | succ m ih =>
    rw [hanoi, pow_succ, ← ih]
    ring
Axioms used: propextformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor

Theorem 5 for ∣r∣<1|r| < 1. Our proof combines the closed form with Mathlib's lemma that rn→0r^n \to 0 (Theorem 4, which we proved by hand above but do not re-prove in Lean):

geom_series_tendstoLean 4Proved here from basic factsFormally verified
/-- **Infinite geometric series.** If `|r| < 1`, the partial sums of `a + ar + ar² + ⋯` tend to
`a/(1 − r)`. The partial sum is `a(1 − rⁿ)/(1 − r)` (`geom_sum`), and `rⁿ → 0` when `|r| < 1`
(Mathlib's `tendsto_pow_atTop_nhds_zero_of_abs_lt_one`), so the partial sums tend to
`a(1 − 0)/(1 − r)`. -/
theorem geom_series_tendsto (a r : ℝ) (hr : |r| < 1) :
    Tendsto (fun n => ∑ k ∈ range n, a * r ^ k) atTop (𝓝 (a / (1 - r))) := by
  have hr1 : r ≠ 1 := by
    intro h
    rw [h, abs_one] at hr
    exact lt_irrefl 1 hr
  have hpow := tendsto_pow_atTop_nhds_zero_of_abs_lt_one hr
  have hlim : Tendsto (fun n => a * (1 - r ^ n) / (1 - r)) atTop (𝓝 (a * (1 - 0) / (1 - r))) :=
    ((tendsto_const_nhds.sub hpow).const_mul a).div_const (1 - r)
  rw [sub_zero, mul_one] at hlim
  refine hlim.congr (fun n => ?_)
  exact (geom_sum a r hr1 n).symm
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor
geom_series_hasSumLean 4Applies a library theoremFormally verified
/-- The same result as a statement about the series: `Σ a rᵏ = a/(1 − r)` for `|r| < 1`. This
applies Mathlib's `hasSum_geometric_of_abs_lt_one` (the case `a = 1`) and multiplies by `a`. -/
theorem geom_series_hasSum (a r : ℝ) (hr : |r| < 1) :
    HasSum (fun n => a * r ^ n) (a / (1 - r)) := by
  rw [div_eq_mul_inv]
  exact (hasSum_geometric_of_abs_lt_one hr).mul_left a
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor
halvesLean 4Applies a library theoremFormally verified
/-- **`1 + 1/2 + 1/4 + 1/8 + ⋯ = 2`.** This applies Mathlib's `hasSum_geometric_two`. -/
theorem halves : HasSum (fun n : ℕ => (1 / 2 : ℝ) ^ n) 2 := hasSum_geometric_two
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor
point_nine_recurringLean 4Proved here from basic factsFormally verified
/-- **`0.999… = 1`.** The decimal `0.999…` *means* the series `9/10 + 9/100 + 9/1000 + ⋯`, a
geometric series with first term `9/10` and ratio `1/10`. Its terms are positive, so it converges
to `S` exactly when its partial sums tend to `S`; and by `geom_series_tendsto` they tend to
`(9/10)/(1 − 1/10) = 1`. -/
theorem point_nine_recurring : HasSum (fun n : ℕ => (9 : ℝ) / 10 ^ (n + 1)) 1 := by
  rw [hasSum_iff_tendsto_nat_of_nonneg (fun n => by positivity)]
  have h := geom_series_tendsto (9 / 10) (1 / 10) (by rw [abs_of_pos (by norm_num)]; norm_num)
  norm_num at h
  refine h.congr (fun n => sum_congr rfl (fun k _ => ?_))
  rw [pow_succ, div_pow, one_pow]
  field_simp
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor

The term test (from Mathlib), divergence for ∣r∣≥1|r| \ge 1, and the harmonic series: Oresme's estimate, the unbounded growth of the partial sums, and the conclusion that terms tending to 00 do not force convergence:

term_testLean 4Applies a library theoremFormally verified
/-- **The term test.** If `Σ aₙ` converges, then `aₙ → 0`. Equivalently: if the terms do *not*
tend to `0`, the series diverges. This applies Mathlib's `Summable.tendsto_atTop_zero`. The
converse is false — see `harmonic_terms_tend_to_zero_but_diverges`. -/
theorem term_test {f : ℕ → ℝ} (h : Summable f) : Tendsto f atTop (𝓝 0) :=
  h.tendsto_atTop_zero
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor
geom_divergesLean 4Proved here from basic factsFormally verified
/-- **If `|r| ≥ 1`, then `Σ rⁿ` diverges.** Its terms satisfy `|rⁿ| = |r|ⁿ ≥ 1`, so they do not
tend to `0`, and the term test rules out convergence. (Mathlib:
`summable_geometric_iff_norm_lt_one`.) -/
theorem geom_diverges (r : ℝ) (hr : 1 ≤ |r|) : ¬ Summable (fun n : ℕ => r ^ n) := by
  intro hs
  have h0 : Tendsto (fun n : ℕ => |r ^ n|) atTop (𝓝 0) := by
    simpa using (term_test hs).abs
  -- Eventually `|rⁿ| < 1`, but every `|rⁿ| = |r|ⁿ ≥ 1`.
  obtain ⟨N, hN⟩ := eventually_atTop.mp (h0.eventually (gt_mem_nhds zero_lt_one))
  have hlt := hN N le_rfl
  rw [abs_pow] at hlt
  exact absurd (one_le_pow₀ hr) (not_le.mpr hlt)
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor
harmonic_two_powLean 4Proved here from basic factsFormally verified
/-- **Oresme's estimate (c. 1350).** `1 + 1/2 + ⋯ + 1/2ⁿ ≥ 1 + n/2`. Group the terms:
the block `1/(2ᵐ + 1) + ⋯ + 1/2ᵐ⁺¹` has `2ᵐ` terms, each at least `1/2ᵐ⁺¹`, so it adds at least
`1/2`. Induction on `n` adds one block at a time. -/
theorem harmonic_two_pow (n : ℕ) :
    1 + (n : ℝ) / 2 ≤ ∑ k ∈ range (2 ^ n), (1 : ℝ) / (k + 1) := by
  induction n with
  | zero => norm_num
  | succ m ih =>
    rw [pow_succ, mul_two, sum_range_add]
    -- The new block: `2ᵐ` terms, each `≥ 1/2ᵐ⁺¹`.
    have hblock : (1 : ℝ) / 2 ≤ ∑ x ∈ range (2 ^ m), (1 : ℝ) / ((2 ^ m + x : ℕ) + 1) := by
      have hterm : ∀ x ∈ range (2 ^ m),
          (1 : ℝ) / (2 ^ (m + 1)) ≤ (1 : ℝ) / ((2 ^ m + x : ℕ) + 1) := by
        intro x hx
        have hx' : x < 2 ^ m := mem_range.mp hx
        apply one_div_le_one_div_of_le (by positivity)
        have : (2 ^ m + x + 1 : ℕ) ≤ 2 ^ (m + 1) := by rw [pow_succ]; omega
        exact_mod_cast this
      calc (1 : ℝ) / 2 = ∑ _x ∈ range (2 ^ m), (1 : ℝ) / (2 ^ (m + 1)) := by
            rw [sum_const, card_range, nsmul_eq_mul, pow_succ]
            push_cast
            field_simp
        _ ≤ _ := sum_le_sum hterm
    push_cast at hblock ih ⊢
    linarith
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor
harmonic_tendsto_atTopLean 4Proved here from basic factsFormally verified
/-- **The harmonic partial sums grow without bound.** `Hₙ = 1 + 1/2 + ⋯ + 1/n` increases with
`n`, and `H_{2ᵐ} ≥ 1 + m/2` exceeds any given bound for large `m`. An increasing sequence that is
not bounded above tends to infinity. (Mathlib: `Real.tendsto_sum_range_one_div_nat_succ_atTop`.) -/
theorem harmonic_tendsto_atTop :
    Tendsto (fun n => ∑ k ∈ range n, (1 : ℝ) / (k + 1)) atTop atTop := by
  apply tendsto_atTop_atTop_of_monotone
  · intro m n hmn
    exact sum_le_sum_of_subset_of_nonneg (range_mono hmn) (fun _ _ _ => by positivity)
  · intro b
    obtain ⟨m, hm⟩ := exists_nat_gt (2 * b)
    refine ⟨2 ^ m, le_trans ?_ (harmonic_two_pow m)⟩
    linarith
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor
harmonic_terms_tend_to_zero_but_divergesLean 4Proved here from basic factsFormally verified
/-- **Terms tending to `0` do not guarantee convergence.** The terms `1/(n + 1)` of the harmonic
series tend to `0`, yet the series diverges: if it converged, its partial sums would tend to a
finite limit, but they tend to infinity (`harmonic_tendsto_atTop`). -/
theorem harmonic_terms_tend_to_zero_but_diverges :
    Tendsto (fun n : ℕ => (1 : ℝ) / (n + 1)) atTop (𝓝 0) ∧
      ¬ Summable (fun n : ℕ => (1 : ℝ) / (n + 1)) := by
  constructor
  · exact tendsto_one_div_add_atTop_nhds_zero_nat
  · intro hs
    exact not_tendsto_nhds_of_tendsto_atTop harmonic_tendsto_atTop _ hs.hasSum.tendsto_sum_nat
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor
harmonic_not_summable_libraryLean 4Applies a library theoremFormally verified
/-- The divergence of the harmonic series in Mathlib's form, `Real.not_summable_one_div_natCast`
(the `n = 0` term is `1/0 = 0` in Lean, which does not affect convergence). -/
theorem harmonic_not_summable_library : ¬ Summable (fun n : ℕ => (1 : ℝ) / n) :=
  Real.not_summable_one_div_natCast
Axioms used: propext, Classical.choice, Quot.soundformal/Lumenary/SequencesSeries.leanTry it in the Lean web editor

A remark for the curious: Mathlib's HasSum asks for unconditional convergence (the sum must not depend on the order of the terms). For the series in this lesson — with terms of one sign, or geometric with ∣r∣<1|r| < 1 — that agrees with the definition by partial sums used above. For a series like 1−12+13−14+⋯1 - \tfrac12 + \tfrac13 - \tfrac14 + \cdots, whose partial sums converge (to ln⁡2\ln 2) but which can be rearranged to converge to anything, the two notions differ. Proposition 8 is not formalised here.

ComputationC

Partial sums, exactly and numerically

Geometric series: exact partial sums and gapsPythonExact computationExhaustive finite checkComputationally tested
"""Geometric series in exact arithmetic: 1 + 1/2 + 1/4 + ... and 0.999...

With fractions the partial sums S_n = a(1 - r^n)/(1 - r) are computed with no
rounding, so we can watch the gap a/(1 - r) - S_n = a r^n/(1 - r) shrink
exactly: for 1 + 1/2 + 1/4 + ... the gap after n terms is 1/2^(n-1), and for
0.9 + 0.09 + 0.009 + ... it is 1/10^n. For |r| >= 1 the partial sums
oscillate or grow instead, and the terms do not tend to 0.
"""

from fractions import Fraction

def partial_sums(a, r, n):
    """[S_1, ..., S_n] for a + ar + ar^2 + ..., exact for Fractions."""
    if n < 0:
        raise ValueError("n must be non-negative")
    sums, total, term = [], 0 * a, a
    for _ in range(n):
        total += term
        sums.append(total)
        term *= r
    return sums

def closed_form(a, r, n):
    """a(1 - r^n)/(1 - r) for r != 1; n * a when r = 1."""
    if r == 1:
        return n * a
    return a * (1 - r ** n) / (1 - r)

def gap(a, r, n):
    """a/(1 - r) - S_n, the part of the infinite sum still missing."""
    return a / (1 - r) - closed_form(a, r, n)

def terms_needed(a, r, eps):
    """Smallest n with |a/(1 - r) - S_n| < eps (requires |r| < 1)."""
    if not abs(r) < 1:
        raise ValueError("needs |r| < 1")
    n = 0
    while abs(gap(a, r, n)) >= eps:
        n += 1
    return n

def main():
    half, tenth = Fraction(1, 2), Fraction(1, 10)
    print("1 + 1/2 + 1/4 + ...  (a = 1, r = 1/2, limit 2)")
    for n, s in enumerate(partial_sums(Fraction(1), half, 8), start=1):
        print(f"  S_{n} = {str(s):>7}   gap = {str(2 - s)}")
    print()
    print("0.9 + 0.09 + 0.009 + ...  (a = 9/10, r = 1/10, limit 1)")
    for n, s in enumerate(partial_sums(Fraction(9, 10), tenth, 5), start=1):
        print(f"  S_{n} = {float(s):.{n}f}   gap = 1 - S_{n} = {1 - s}")
    print("The gap 1/10^n eventually drops below any positive number, so the")
    print("limit of the partial sums, which is what 0.999... means, is exactly 1.")
    print()
    ok = all(
        partial_sums(Fraction(3), r, 30)[-1] == closed_form(Fraction(3), r, 30)
        for r in (half, -half, Fraction(2, 3), Fraction(-9, 10), Fraction(5))
    )
    print(f"Closed form a(1 - r^n)/(1 - r) agrees with term-by-term sums: {ok}")
    need = terms_needed(Fraction(1), half, Fraction(1, 10 ** 6))
    print(f"Terms of 1 + 1/2 + ... needed to come within 10^-6 of 2: {need}")
    print()
    for r in (1, -1, 2):
        sums = partial_sums(1, r, 8)
        print(f"r = {r:2d}: partial sums {sums} - no limit")
    print()
    print("Epistemic status: exact rational arithmetic for finitely many n;")
    print("the closed form and the limits are proved in the lesson (and in")
    print("Lean); a table of partial sums can only illustrate convergence.")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

The exact gaps 12n−1\tfrac{1}{2^{n-1}} and 110n\tfrac{1}{10^n} are the "error terms" a rn1−r\tfrac{a\,r^n}{1 - r} of Theorem 5's proof, made visible. But a table of finitely many partial sums never proves convergence: it is the formula, valid for every nn, together with rn→0r^n \to 0, that does.

The harmonic series grows without bound, slowlyPythonExact computationNumerical approximationComputationally tested
"""The harmonic series: terms that shrink to 0, sums that never stop growing.

Oresme's grouping says the block 1/(2^k + 1) + ... + 1/2^(k+1) is at least 1/2;
we compute these blocks exactly with fractions. Then, with 40-digit decimal
arithmetic, we find the first n with H_n = 1 + 1/2 + ... + 1/n > t for
t = 1, ..., 10 (H_n first exceeds 10 at n = 12367) and compare H_n with
ln n + 0.5772 (Euler's constant). By contrast, 1 + 1/4 + 1/9 + ... stays
below 2.
"""

import math
from decimal import Decimal, localcontext
from fractions import Fraction

#: Euler's constant gamma, to 16 digits (used only for comparison).
EULER_GAMMA = 0.5772156649015329

def oresme_block(k):
    """1/(2^k + 1) + ... + 1/2^(k+1), exactly (2^k terms)."""
    if k < 0:
        raise ValueError("k must be non-negative")
    return sum(Fraction(1, j) for j in range(2 ** k + 1, 2 ** (k + 1) + 1))

def harmonic_exact(n):
    """H_n = 1 + 1/2 + ... + 1/n as a Fraction (for small n)."""
    return sum((Fraction(1, j) for j in range(1, n + 1)), Fraction(0))

def first_exceeding(targets):
    """For each target t (increasing), the least n with H_n > t.

    Uses Decimal with 40 significant digits: after 10^5 additions the
    accumulated rounding error is far below the gaps 1/n near the answers.
    """
    answers = []
    with localcontext() as ctx:
        ctx.prec = 40
        total, n = Decimal(0), 0
        for t in targets:
            while total <= t:
                n += 1
                total += Decimal(1) / n
            answers.append(n)
    return answers

def basel_partial(n):
    """1 + 1/4 + ... + 1/n^2 in floating point (math.fsum)."""
    return math.fsum(1.0 / (j * j) for j in range(1, n + 1))

def main():
    print("Oresme's blocks (exact): each block of 2^k terms is at least 1/2")
    for k in range(5):
        block = oresme_block(k)
        terms = f"1/{2 ** k + 1} + ... + 1/{2 ** (k + 1)}" if k else "1/2"
        print(f"  k = {k}: {terms} = {float(block):.4f}"
              f"  >= 1/2: {block >= Fraction(1, 2)}")
    print("So H(2^m) >= 1 + m/2: the partial sums pass every bound.")
    print()
    targets = list(range(1, 11))
    print("t    first n with H_n > t    ln n + gamma")
    for t, n in zip(targets, first_exceeding(targets)):
        print(f"{t:2d}   {n:12d}             {math.log(n) + EULER_GAMMA:.4f}")
    print("The terms 1/n tend to 0, yet the sums still reach any height -")
    print("it takes roughly e^(t - 0.58) terms to reach height t.")
    print()
    for n in [10, 1000, 100000]:
        print(f"1 + 1/4 + ... + 1/{n}^2 = {basel_partial(n):.6f}   (< 2)")
    print(f"pi^2/6 = {math.pi ** 2 / 6:.6f}, Euler's value of the whole sum")
    print()
    print("Epistemic status: the blocks are exact for k <= 4 (the lesson")
    print("proves the bound for all k); the first-exceeding table uses")
    print("40-digit decimals, numerical but with error far below 1/n; the")
    print("ln n + gamma column is an approximation. No finite table proves")
    print("divergence: the grouping argument does.")

if __name__ == "__main__":
    main()
Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.

The harmonic experiment shows why evidence can mislead in both directions. After 12 36712\,367 terms the sum has only just passed 1010, and it creeps upward so slowly that a computer adding a billion terms a second would need longer than the age of the universe to pass 100100. A computer alone could never show that the series diverges; Oresme's grouping argument does it in four lines.

Exercises

Exercises

1. Sequences and series

Warm-upHuman

Find the sum of the first 2020 terms of the arithmetic sequence 5,8,11,14,…5, 8, 11, 14, \dots

2. Sequences and series

Warm-upHuman

Compute 3+6+12+24+⋯+3⋅293 + 6 + 12 + 24 + \dots + 3 \cdot 2^{9} (ten terms).

3. Sequences and series

Warm-upHuman

A sequence is defined by a1=2a_1 = 2 and an+1=3an−1a_{n+1} = 3a_n - 1. What is a5a_5?

4. Sequences and series

CoreHuman

Which of these infinite series converge? (Choose all that apply.)

Choose all that apply

5. Sequences and series

CoreHuman

Write 0.45‾=0.454545…0.\overline{45} = 0.454545\ldots as a geometric series a+ar+ar2+⋯a + ar + ar^2 + \cdots and find its sum pq\tfrac pq in lowest terms. Enter qq.

6. Sequences and series

CoreHuman

A student argues: "The terms 1k\tfrac{1}{\sqrt k} tend to 00, so by the term test ∑k=1∞1k\sum_{k=1}^{\infty} \tfrac{1}{\sqrt k} converges." What is wrong?

Choose one

7. Sequences and series

StretchHuman

In the proof that the harmonic series diverges, why is 19+110+⋯+116≥12\tfrac{1}{9} + \tfrac{1}{10} + \dots + \tfrac{1}{16} \ge \tfrac12?

Choose one

8. Sequences and series

CoreFormal

In Lean, HasSum f S means "the series ∑n≥0f(n)\sum_{n \ge 0} f(n) converges to SS". Which statement formalises 0.999…=10.999\ldots = 1?

Choose one

9. Sequences and series

StretchComputational

Write terms_needed(a, r, eps) for 0<r<10 < r < 1 and a>0a > 0: the smallest nn such that the partial sum Sn=a+ar+⋯+arn−1S_n = a + ar + \dots + ar^{n-1} is within eps of the limit a1−r\tfrac{a}{1 - r}. Use Fraction for exact arithmetic (the tests pass fractions). By Theorem 5 the gap is a rn1−r\tfrac{a\,r^n}{1 - r}.

Runs entirely in your browser, in an isolated worker. Nothing is sent to a server.
Common misconceptionsH

Common misconceptions

Misconception

"If the terms tend to 00, the series converges." The harmonic series 1+12+13+⋯1 + \tfrac12 + \tfrac13 + \cdots has terms tending to 00 and diverges. Terms tending to 00 is necessary for convergence (Theorem 6), but not sufficient.

Misconception

"An infinite sum of positive numbers must be infinite." 1+12+14+⋯=21 + \tfrac12 + \tfrac14 + \cdots = 2. What matters is how fast the terms shrink: geometrically shrinking terms add up to a finite total.

Misconception

"0.999…0.999\ldots is slightly less than 11." 0.999…0.999\ldots is the geometric series 910+9100+⋯\tfrac{9}{10} + \tfrac{9}{100} + \cdots, whose sum is exactly 11. There is no real number strictly between 0.999…0.999\ldots and 11: any gap would have to be smaller than 10−n10^{-n} for every nn, hence 00.

Misconception

"1+r+r2+⋯=11−r1 + r + r^2 + \cdots = \tfrac{1}{1 - r} for every r≠1r \ne 1." Only for ∣r∣<1|r| < 1. For r=2r = 2 the formula would give 1+2+4+⋯=−11 + 2 + 4 + \cdots = -1, which is nonsense for real numbers: the partial sums 2n−12^n - 1 grow without bound. The finite formula 1−rn1−r\tfrac{1 - r^n}{1 - r} is valid for all r≠1r \ne 1; the infinite one needs rn→0r^n \to 0.

Misconception

"A sequence converges if its terms get closer together." n\sqrt n has consecutive differences n+1−n=1n+1+n→0\sqrt{n + 1} - \sqrt n = \tfrac{1}{\sqrt{n + 1} + \sqrt n} \to 0, yet n→∞\sqrt n \to \infty. Convergence is about getting close to a fixed limit, not just to the next term.

ViewpointsH

Other ways of seeing

Geometry— Self-similar pictures

Geometric series describe self-similar shapes. In the figure above, the square minus its left half is a half-size copy of a familiar shape, and the series records the copies. The Koch snowflake — repeatedly add an equilateral bump to the middle third of every edge — has perimeter multiplied by 43\tfrac43 at every stage, so its perimeter is infinite (r=43>1r = \tfrac43 > 1), while the areas of the bumps form a geometric series with ratio 49\tfrac49, so its area is finite: 85\tfrac85 of the starting triangle.

Probability— Waiting for heads

Toss a fair coin until it lands heads. The probability that the first head comes on toss nn is (12)n−1⋅12=12n\big(\tfrac12\big)^{n-1}\cdot\tfrac12 = \tfrac{1}{2^n}, and these probabilities add up to 12+14+⋯=1\tfrac12 + \tfrac14 + \cdots = 1 — as total probability must. The expected number of tosses is ∑n≥1n2n=2\sum_{n \ge 1} \tfrac{n}{2^n} = 2, a sum one can find by differentiating the geometric series ∑xn=11−x\sum x^n = \tfrac{1}{1 - x} term by term. Infinite series are the language of probability with infinitely many outcomes.

Number theory— Decimals, and a world where 1 + 2 + 4 + ⋯ = −1

Every decimal 0.d1d2d3…0.d_1d_2d_3\ldots is the series ∑dk 10−k\sum d_k\,10^{-k}, and the theory of geometric series is exactly why repeating decimals are fractions. Number theorists also measure size differently: in the 22-adic numbers a number is "small" when it is divisible by a high power of 22, so 2n→02^n \to 0! There the geometric series formula holds for r=2r = 2 and 1+2+4+8+⋯=11−2=−11 + 2 + 4 + 8 + \cdots = \tfrac{1}{1 - 2} = -1 is a genuine theorem. This is not a trick about real numbers — in R\R that series diverges — but a different notion of distance, and pp-adic numbers are central in modern number theory.

Analysis— Convergence without knowing the limit

The definition of convergence needs the limit LL in advance. Cauchy found a test that does not: a sequence converges if and only if its terms eventually stay arbitrarily close to each other (∣sm−sn∣<ε|s_m - s_n| < \varepsilon for all large m,nm, n). That this works is equivalent to the completeness of R\R, the property that also makes increasing bounded sequences converge, as used for ∑1k2\sum \tfrac1{k^2}. Series whose signs alternate bring new subtleties: 1−12+13−⋯1 - \tfrac12 + \tfrac13 - \cdots converges to ln⁡2\ln 2, but Riemann proved that its terms can be rearranged to converge to any number you like. See Real analysis.

History & global context

History and global context

  • Ancient sums. The Egyptian Rhind papyrus (about 1550 BCE) adds the geometric sequence 7,49,343,2401,168077, 49, 343, 2401, 16807. Zeno of Elea's paradoxes (5th century BCE) raised the question of infinite sums. Archimedes (3rd century BCE) summed 1+14+116+⋯=431 + \tfrac14 + \tfrac1{16} + \cdots = \tfrac43 to find the area of a parabolic segment, by an argument that avoided the infinite through a double reductio ad absurdum.
  • India. Āryabhaṭa (499 CE) gave rules for arithmetic series and for the sums of squares and cubes. Writers on Sanskrit prosody, from Virahāṅka to Hemachandra (about 1150), counted poetic metres with the recursion now called Fibonacci's. In the 14th century, Mādhava of Saṅgamagrāma and the Kerala school found infinite series such as π4=1−13+15−⋯\tfrac\pi4 = 1 - \tfrac13 + \tfrac15 - \cdots.
  • Europe. Nicole Oresme proved the divergence of the harmonic series around 1350, by the grouping in Theorem 7. Pietro Mengoli asked for the sum of ∑1k2\sum \tfrac{1}{k^2} in 1650, and Leonhard Euler found π26\tfrac{\pi^2}{6} in 1734. Augustin-Louis Cauchy's Cours d'analyse (1821) gave the modern definition of convergence through limits of partial sums.
Further reading

Further reading

  • Richard Courant and Herbert Robbins, What Is Mathematics? (1941), chapter VI, on functions and limits.
  • William Dunham, Journey Through Genius (1990) — chapters on the harmonic series and Euler's solution of the Basel problem.
  • Julian Havil, Gamma: Exploring Euler's Constant (2003) — everything about 1+12+⋯+1n−ln⁡n1 + \tfrac12 + \dots + \tfrac1n - \ln n.
  • Stephen Abbott, Understanding Analysis (2001), chapter 2 — the rigorous next step on sequences and series.
  • Konrad Knopp, Theory and Application of Infinite Series (1922; English translation 1928) — the classic reference.