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

Exercise 1.2.7-4

proved in Lean solution written

Rating10
KindK2, decide: say whether a claim holds from the written solution
SectionSection 1.2.7 of Volume 1. Companion chapter: Harmonic numbers

The task

Decide which of the claims Hn<ln⁡nH_n < \ln n, Hn>ln⁡nH_n > \ln n and Hn>ln⁡n+γH_n > \ln n + \gamma hold for all positive integers nn.

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

Compare 1/k1/k with the area under 1/x1/x on the interval from kk to k+1k+1.

Hint 2

For the third claim, study the difference Hn−ln⁡nH_n - \ln n and show that it decreases with nn.

Solution

Show the solution

Answer: the first claim is false, the second and third are true.

First claim. For n=1n = 1, H1=1H_1 = 1 and ln⁡1=0\ln 1 = 0, so H1<ln⁡1H_1 < \ln 1 fails.

Second claim. For x∈[k,k+1]x \in [k, k+1], 1x≤1k\frac1x \le \frac1k. So ∫kk+1dxx≤1k\int_k^{k+1}\frac{dx}{x} \le \frac1k. Add this for k=1,…,nk = 1, \ldots, n: ln⁡(n+1)≤Hn\ln(n+1) \le H_n. Since ln⁡n<ln⁡(n+1)\ln n < \ln(n+1), Hn>ln⁡nH_n > \ln n.

Third claim. Let dn=Hn−ln⁡nd_n = H_n - \ln n, so that dn→γd_n \to \gamma. Then dn+1−dn=1n+1−ln⁡(1+1n)d_{n+1} - d_n = \frac{1}{n+1} - \ln\left(1 + \frac1n\right). The inequality ln⁡(1+x)>x1+x\ln(1 + x) > \frac{x}{1+x} for x>0x > 0, with x=1nx = \frac1n, says that ln⁡(1+1n)>1n+1\ln(1 + \frac1n) > \frac{1}{n+1}. So dn+1<dnd_{n+1} < d_n, and the sequence dnd_n strictly decreases. A strictly decreasing sequence is larger than its limit, so dn>γd_n > \gamma for all n≥1n \ge 1.

Check

Python gives Hn−ln⁡n=1,0.8069,0.7347,0.6264,0.5822H_n - \ln n = 1, 0.8069, 0.7347, 0.6264, 0.5822 for n=1,2,3,10,100n = 1, 2, 3, 10, 100. The values decrease and stay above γ=0.5772\gamma = 0.5772. For n=10n = 10: H10=2.9290H_{10} = 2.9290, ln⁡10=2.3026\ln 10 = 2.3026, and ln⁡10+γ=2.8798<2.9290\ln 10 + \gamma = 2.8798 < 2.9290.

Remarks

Eq. (3) shows that Hn−ln⁡n−γH_n - \ln n - \gamma is about 12n\frac{1}{2n}, which is positive. So the third claim is a weak form of this fact.

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. Lean states the parts one by one.

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

Something is wrong? Report it.