Article 76KST Height of harmonic numbers

Height of harmonic numbers

by
John
from John D. Cook on (#76KST)

The previous post looked at writing the harmonic numbers as reduced fractions and estimating the number of digits in the numerator and denominator based on asymptotics. This is a follow up post with plots.

We'll choose our baseb to be 2. And we'll look at the total number of bits in both the numerator and denominator, which we will use as the height of the fractions.

First, let's look at the actual and estimated heights, using the estimates from the previous post.

harmonic_height1.png

Next let's look at the difference between the actual and estimated heights.

harmonic_height2.png

In the previous post I looked at n = 50, which was kind of a lucky choice, the error being smaller than usual. I had also looked at, but didn't publish, n = 100, which would be an unlucky choice.

Finally, let's look at the relative error in the estimates, and plot over a larger range of n.

harmonic_height3.png

The error goes to zero, as predicted by the asymptotic estimates. And it goes noisily, which you'd expect since the heights are related to the distribution of primes.

The post Height of harmonic numbers first appeared on John D. Cook.
External Content
Source RSS or Atom Feed
Feed Location http://feeds.feedburner.com/TheEndeavour?format=xml
Feed Title John D. Cook
Feed Link https://www.johndcook.com/blog
Reply 0 comments