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

Exercise 1.2.7-12

stated in Lean solution written

RatingM10
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

Evaluate H∞(1000)H_\infty^{(1000)} to at least 100 decimal places.

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

Write the sum as 1+∑k≥2k−10001 + \sum_{k \ge 2} k^{-1000} and bound the tail by a quantity that you can compare with 10−10010^{-100}.

Solution

Show the solution

H∞(1000)=1+∑k≥2k−1000H_\infty^{(1000)} = 1 + \sum_{k \ge 2} k^{-1000}. Bound the tail with the integral: for k≥3k \ge 3, k−1000≤∫k−1kx−1000 dxk^{-1000} \le \int_{k-1}^{k} x^{-1000}\,dx. So

∑k≥2k−1000≤2−1000+∫2∞x−1000 dx=2−1000(1+2999)<2−999.\sum_{k \ge 2}k^{-1000} \le 2^{-1000} + \int_2^\infty x^{-1000}\,dx = 2^{-1000}\left(1 + \frac{2}{999}\right) < 2^{-999}.

Now 2−999=1.8665…×10−3012^{-999} = 1.8665\ldots \times 10^{-301}, which is less than 10−10010^{-100}. So H∞(1000)=1H_\infty^{(1000)} = 1 up to an error below 10−30010^{-300}. To 100 decimal places the value is 1.000…01.000\ldots0 with 100100 zeros, and the first nonzero digit after the point is the digit at place 302302, since 2−1000=9.33×10−3022^{-1000} = 9.33\times 10^{-302}.

Check

Python gives 2−1000=9.3326…×10−3022^{-1000} = 9.3326\ldots \times 10^{-302} and 2−999=1.8665…×10−3012^{-999} = 1.8665\ldots \times 10^{-301}. The difference ζ(1000)−1\zeta(1000) - 1 is of the size 9.33×10−3029.33 \times 10^{-302}, since the term 2−10002^{-1000} dominates.

Remarks

For large rr, H∞(r)−1H_\infty^{(r)} - 1 is about 2−r2^{-r}. This agrees with the bound of exercise 1.2.7-3, which tends to 11.

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

In Lean

stated The statement is in Lean and it builds. The proof is not in Lean yet.

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

Something is wrong? Report it.