返回 2026-06-28
⚙️ 工程

调和数的高度Height of harmonic numbers

johndcook.com·2026-06-27 节选正文

将调和数表示为最简分数时,其分子和分母的位数可以通过渐近线进行有效估算。本文作为前文的后续,利用图表直观展示了调和数分子与分母位数的增长趋势。以 2 为底时,文章详细分析了分子和分母在二进制下的总位数表现。这种可视化分析有助于深入理解调和数的计算复杂度。这些图表揭示了调和数在底层表示中的巨大数值规模。

John

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 base b 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.

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

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.

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.

需要完整排版与评论请前往来源站点阅读。