A sequence is an ordered list of numbers indexed by integers, and almost every loop you will ever write walks one. Section 5.1 gives the notation, summation Σ, product Π, and factorial, and the algebra for reshaping sums. Sections 5.2 and 5.3 introduce the chapter's real subject: mathematical induction, the technique for proving a claim holds for every integer from some starting point on.
Why it matters. Induction is how we prove a closed-form sum equals its loop, that an algorithm is correct for every input size, and that a recurrence has the formula we conjectured. It is the backbone of the analysis of algorithms, and it is what justifies results you have already used, such as “a set with n elements has 2n subsets” in Chapter 6.
The full recorded session for sections 5.2 and 5.3. Watch it alongside this companion: the worked proofs below mirror the lecture, and the induction-proof walker and the divisibility, inequality and recurrence checkers let you practise each method as it is introduced.
Going the other way, fitting a formula to given terms is a conjecture, not a proof: read off two patterns, the size and the sign. For 1, −1/4, 1/9, −1/16, … the sizes are 1/k2 and the signs alternate starting positive, giving ak = (−1)k+1/k2. A fitted formula should be proved (by induction, later in this chapter).
Substitute k = 1, 2, 3, 4:
a₁ = 1/11, a₂ = 2/12 = 1/6, a₃ = 3/13, a₄ = 4/14 = 2/7.
Two patterns. Size: the magnitudes are 0, 1, 2, 3, 4, 5, i.e. n − 1. Sign: term n = 1 is +, term n = 2 is +… check parities: a₂ = +1, a₃ = −2, a₄ = +3, so the sign is + on even n and − on odd n, i.e. (−1)n.
Combine: an = (−1)n(n − 1). Check: a₁ = (−1)(0) = 0, a₂ = (1)(1) = 1, a₃ = (−1)(2) = −2. ✓
Substitute k = j + 1. The summand 1/(k − 1) becomes 1/j.
Recompute the limits: k = 2 ⇒ j = 1 and k = n ⇒ j = n − 1. Hence nΣk=2 1/(k−1) = n−1Σj=1 1/j. Same value; lower the start and the summand together.
Some claims are about infinitely many integers at once: “every amount of 8 cents or more can be paid with 3-cent and 5-cent coins”, or “1 + 2 + … + n = n(n+1)/2 for every n ≥ 1”. We cannot check the cases one by one. Induction proves them all in two steps.
The assumption P(k) in the inductive step is the inductive hypothesis. This is not circular: we assume P(k) for a single k and show that this forces P(k+1). We never assume the conclusion for all n; the basis plus that single link is what makes the whole chain fall.
Basis (n = 1). Left = 2; right = 1 + 1 = 2. ✓
Hypothesis. Assume 2 + 4 + … + 2k = k2 + k for some k ≥ 1.
Step. Add the next term 2(k+1):
2 + 4 + … + 2k + 2(k+1) = (k2 + k) + 2(k+1) = k2 + 3k + 2 = (k+1)2 + (k+1).
That is the formula at n = k+1, so it holds for all n ≥ 1. ■
By Theorem 5.2.3 with r = 3: nΣk=0 3k = (3n+1 − 1)/(3 − 1) = (3n+1 − 1)/2.
For k = 1 to 5, drop the k = 0 term (which is 1): (36 − 1)/2 − 1 = 728/2 − 1 = 364 − 1 = 363. Check: 3 + 9 + 27 + 81 + 243 = 363. ✓
The same recipe, basis then inductive step, proves three further families of statement: divisibility, inequalities, and closed forms of recursive sequences. Only the algebra of the step changes.
Basis (n = 0). 70 − 1 = 0 = 6 · 0. ✓
Hypothesis. Assume 7k − 1 = 6r for some integer r, i.e. 7k = 6r + 1.
Step. 7k+1 − 1 = 7 · 7k − 1 = 7(6r + 1) − 1 = 42r + 6 = 6(7r + 1). Since 7r + 1 is an integer, 7k+1 − 1 is divisible by 6. By induction, true for all n ≥ 0. ■
A selection of the exercises recommended on the slides, solved in full and grounded in Epp's exercise sets. Attempt each on paper before revealing.
Substitute i = 0, 1, 2, 3; the (−1)i flips the sign each step:
c₀ = 1/1 = 1, c₁ = −1/3, c₂ = 1/9, c₃ = −1/27.
Split by partial fractions: 1/(k(k+1)) = 1/k − 1/(k+1). The sum telescopes:
(1 − 1/2) + (1/2 − 1/3) + … + (1/n − 1/(n+1)) = 1 − 1/(n+1) = n/(n+1).
Every interior piece cancels with its neighbour, leaving only the first piece 1 and the last −1/(n+1).
Write the larger factorial in terms of the smaller, then cancel:
(n + 2)! / n! = [(n + 2)(n + 1) · n!] / n! = (n + 2)(n + 1) = n2 + 3n + 2.
Basis (n = 14). 14 = 3 + 3 + 8. Payable. ✓
Hypothesis. Assume some amount k ≥ 14 is payable with 3s and 8s.
Step. Show k + 1 is payable, in two cases on the k-cent payment:
In both cases k + 1 is payable, so by induction every n ≥ 14 is payable. ■
Basis (n = 1). Left = 1; right = 1·2·3/6 = 1. ✓
Hypothesis. Assume 12 + … + k2 = k(k+1)(2k+1)/6.
Step. Add (k+1)2:
k(k+1)(2k+1)/6 + (k+1)2 = (k+1)[k(2k+1) + 6(k+1)]/6 = (k+1)(2k2 + 7k + 6)/6.
Factor: 2k2 + 7k + 6 = (k+2)(2k+3), so the sum is (k+1)(k+2)(2k+3)/6, which is the formula at n = k+1 (since 2(k+1)+1 = 2k+3). ■
Factor out the common 4: 4 + 8 + … + 200 = 4(1 + 2 + … + 50).
By Theorem 5.2.2, 1 + 2 + … + 50 = 50·51/2 = 1275.
So the sum is 4 · 1275 = 5100.
Basis (n = 5). 25 < 32. ✓ (It fails at n = 2, 3, 4, so the basis is 5.)
Hypothesis. Assume k2 < 2k for some k ≥ 5.
Step. (k+1)2 = k2 + 2k + 1. For k ≥ 5, 2k + 1 < k2 (since k2 − 2k − 1 = (k−1)2 − 2 > 0). So
(k+1)2 = k2 + (2k + 1) < k2 + k2 = 2k2 < 2 · 2k = 2k+1.
So the claim holds for all n ≥ 5. ■
Basis (n = 0). b0 = 5 > 0 = 4·0. ✓
Hypothesis. Assume bk > 4k for some k ≥ 0.
Step. By the recurrence, bk+1 = 4 + bk > 4 + 4k = 4(k+1), using the hypothesis. So bk+1 > 4(k+1), and by induction bn > 4n for all n ≥ 0. ■
Expand the larger factorial just far enough to reach the smaller one, using m! = m · (m−1)! twice:
(2n + 1)! = (2n + 1) · (2n)! = (2n + 1) · (2n) · (2n − 1)!
So (2n + 1)! / (2n − 1)! = (2n + 1)(2n) = 4n2 + 2n. The (2n − 1)! cancels entirely, leaving a polynomial.
This is already in difference form bk − bk+1 with bk = √k (written as √(k+1) − √k = −(bk − bk+1)), so it telescopes:
(√2 − √1) + (√3 − √2) + … + (√(n+1) − √n) = √(n+1) − 1.
Every interior √ appears once with each sign and cancels; only √(n+1) and −√1 = −1 survive. So the sum is √(n+1) − 1.