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.9-3

Exercise 1.2.9-3

proved in Lean solution written

RatingHM21
MarkersHM (needs higher mathematics)
KindK1, prove: show that a stated fact is true from the written solution
SectionSection 1.2.9 of Volume 1. Companion chapter: Generating functions

The task

Differentiate the generating function of the harmonic numbers, compare it with the generating function of the partial sums ∑k≤nHk\sum_{k\le n}H_k, and deduce a closed form for those sums.

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

The generating function (18) is 11−zln⁡11−z\frac1{1-z}\ln\frac1{1-z}. Differentiate it with the product rule.

Hint 2

The series 11−z\frac1{1-z} times a series A(z)A(z) is the series of the partial sums of the coefficients of AA.

Hint 3

Compare the coefficient of znz^n on both sides.

Solution

Show the solution

Let L=ln⁡11−zL=\ln\frac1{1-z} and G(z)=∑k≥0Hkzk=L/(1−z)G(z)=\sum_{k\ge0}H_kz^k=L/(1-z). Since L′=1/(1−z)L'=1/(1-z),

G′(z)=L(1−z)2+1(1−z)2=G(z)1−z+1(1−z)2.G'(z)=\frac{L}{(1-z)^2}+\frac1{(1-z)^2}=\frac{G(z)}{1-z}+\frac1{(1-z)^2}.

Multiplying a series by 1/(1−z)1/(1-z) replaces its coefficients by their partial sums. So G(z)/(1−z)=∑n(∑k=0nHk)znG(z)/(1-z)=\sum_n\bigl(\sum_{k=0}^nH_k\bigr)z^n, and 1/(1−z)2=∑n(n+1)zn1/(1-z)^2=\sum_n(n+1)z^n. The coefficient of znz^n in G′(z)G'(z) is (n+1)Hn+1(n+1)H_{n+1}. So

(n+1)Hn+1=∑k=0nHk+(n+1),hence∑k=0nHk=(n+1)Hn+1−(n+1)=(n+1)Hn−n.(n+1)H_{n+1}=\sum_{k=0}^nH_k+(n+1),\qquad\text{hence}\qquad\sum_{k=0}^nH_k=(n+1)H_{n+1}-(n+1)=(n+1)H_n-n.

The last form uses (n+1)Hn+1=(n+1)Hn+1(n+1)H_{n+1}=(n+1)H_n+1.

Check

For n=2n=2: H0+H1+H2=0+1+32=52H_0+H_1+H_2=0+1+\tfrac32=\tfrac52, and 3H2−2=92−2=523H_2-2=\tfrac92-2=\tfrac52. For n=3n=3: 52+116=133\tfrac52+\tfrac{11}6=\tfrac{13}3, and 4H3−3=223−3=1334H_3-3=\tfrac{22}3-3=\tfrac{13}3.

Remarks

The same value follows from summation by parts, as in Section 1.2.7. The method extends to ∑k≤n(km)Hk\sum_{k\le n}\binom kmH_k with the series (25).

This solution is drafted, 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.