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

Exercise 1.2.7-9

proved in Lean solution written

RatingM18
MarkersM (mathematical)
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 ∑k=1n(nk)xkHk\sum_{k=1}^{n}\binom{n}{k}x^kH_k for x=−1x = -1.

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

Let SnS_n be the sum. Find a recurrence that relates Sn+1S_{n+1} to SnS_n. Use Pascal's rule and Hk=Hk−1+1kH_k = H_{k-1} + \frac1k.

Hint 2

Put x=−1x = -1 in the recurrence.

Solution

Show the solution

Let Sn(x)=∑k(nk)xkHkS_n(x) = \sum_k \binom nk x^kH_k. By Pascal's rule, (n+1k)=(nk)+(nk−1)\binom{n+1}{k} = \binom nk + \binom{n}{k-1}, so

Sn+1=Sn+∑k≥1(nk−1)xkHk.S_{n+1} = S_n + \sum_{k \ge 1}\binom{n}{k-1}x^kH_k.

Put Hk=Hk−1+1kH_k = H_{k-1} + \frac1k in the second sum, and use (nk−1)1k=1n+1(n+1k)\binom{n}{k-1}\frac1k = \frac{1}{n+1}\binom{n+1}{k}:

∑k≥1(nk−1)xkHk=x Sn+1n+1∑k≥1(n+1k)xk=x Sn+(1+x)n+1−1n+1.\sum_{k \ge 1}\binom{n}{k-1}x^kH_k = x\,S_n + \frac{1}{n+1}\sum_{k \ge 1}\binom{n+1}{k}x^k = x\,S_n + \frac{(1+x)^{n+1} - 1}{n+1}.

So Sn+1=(1+x)Sn+(1+x)n+1−1n+1S_{n+1} = (1+x)S_n + \dfrac{(1+x)^{n+1} - 1}{n+1}. For x=−1x = -1 the terms with the powers (1+x)(1+x) vanish and Sn+1=−1n+1S_{n+1} = -\dfrac{1}{n+1} for all n≥0n \ge 0. Therefore

∑k=1n(nk)(−1)kHk=−1n,n≥1.\sum_{k=1}^{n}\binom nk(-1)^kH_k = -\frac1n, \qquad n \ge 1.

Check

Python gives the sums for n=1,…,6n = 1, \ldots, 6 as −1,−12,−13,−14,−15,−16-1, -\frac12, -\frac13, -\frac14, -\frac15, -\frac16. For n=2n = 2: −2⋅1+1⋅32=−12-2 \cdot 1 + 1 \cdot \frac32 = -\frac12.

Remarks

This is the inverse pair of the relation Hn=∑k=1n(nk)(−1)k+1kH_n = \sum_{k=1}^{n}\binom nk\frac{(-1)^{k+1}}{k}. Exercise 1.2.7-13 with x=0x = 0 is this relation.

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.