taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 1.2.7-1

Exercise 1.2.7-1

proved in Lean solution written

Rating01
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 1.2.7 of Volume 1. Companion chapter: Harmonic numbers

The task

Find the values H0H_0, H1H_1 and H2H_2.

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

Use the definition (1) and recall that a sum with no terms is 00.

Solution

Show the solution

By definition Hn=∑k=1n1/kH_n = \sum_{k=1}^{n} 1/k. For n=0n = 0 the range 1≤k≤01 \le k \le 0 is empty, so H0=0H_0 = 0. For n=1n = 1 there is one term, H1=1H_1 = 1. For n=2n = 2, H2=1+12=32H_2 = 1 + \frac12 = \frac32.

Check

The recurrence Hn=Hn−1+1nH_n = H_{n-1} + \frac1n holds for n≥1n \ge 1: H1=0+1H_1 = 0 + 1 and H2=1+12=32H_2 = 1 + \frac12 = \frac32. The next value is H3=116H_3 = \frac{11}{6}.

Remarks

The rule H0=0H_0 = 0 makes the recurrence Hn=Hn−1+1nH_n = H_{n-1} + \frac1n true for all n≥1n \ge 1. Exercise 1.2.7-6 connects HnH_n with Stirling numbers.

This solution is checked, and a person has not reviewed it yet. The source.

In Lean

proved The statement and its proof are in Lean. The kernel accepts the proof, and it uses the standard axioms only.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.