Inverse of the harmonic sum

1.2k Views Asked by At

I am looking for an inverse of the function $H_n = \sum_{k=1}^n \frac{1}{k}.$

A function $H^{-1}_M$ that equals the smallest $n$ such that $H_n\ge M.$

Is there a function like this? And if not, is there a function that approximates the number?

4

There are 4 best solutions below

1
On BEST ANSWER

I do not know how to get the lowest $n$ such that $H_n>M$, but I do know how to get upper bound to that $n$.


The easiest upper bound to find is: $n=2^{2(M-1)}$(assuming $M\in\Bbb N$, otherwise we can take $\lceil M\rceil$), the proof is not that hard and doesn't use any advance methods.

First we notice that $$H_{2n}>1/2+H_n\quad(1)$$

Proof of (1); $$H_{2n}-H_n=\sum_{j=1}^{2n}\frac1j-\sum_{i=1}^n\frac1i=\sum_{j=n+1}^{2n}\frac1j>\sum_{j=n+1}^{2n}\frac1{2n}=\frac12\\\implies H_{2n}=\frac12+H_n$$

Now we can get from this other result using induction:

If $\frac n{2^{m-1}}\in\Bbb N$ where $m\in\Bbb N$ we get $$H_{2n}>\frac m2+H_{n/(2^{m-1})}$$

The base case is $(1)$, and the general case is very simple (try to do it yourself).

So if we set $n=2^{m-1}$ and solve the equation $M=\frac m2+1$ we get $m=2(M-1)\implies n=2^{2M-3}\implies 2n=2^{2(M-1)}\\\implies H_{2^{2(M-1)}}>M$

Note that this by no means the best bound, for example if $M=5$ you'll get $n=256$ to be a upper bound but if you calculate you'll find that even $n=83$ works.


That said, another way is to use more advance calculus:

Consider the function $\frac1x$, the area under this function from from $1$ to $n$ is $\int_1^n\frac1x\;dx=\ln n$, we can also notice that the area from $1$ to $2$ is more than the area of the constant function $\frac12$ from $1$ to $2$ and less than the constant function $1$ from $1$ to $2$, doing this for all intervals from $k$ to $k+1$ and adding them together you get that $H_n-1<\ln n<H_n$, from this we get $\ln n<H_n<\ln n+1$, so, like the previous approach I'll compare $\ln n=M$ and get $n=e^M$, of course we want it to be an integer so we will say $n=\lceil e^M\rceil$.


This result, needless to say, gives better bound ( to the power of $2M$ compared to the power of $M$) but because it uses integrals I feel the need to add the first method too.

1
On

For approximations see sequence http://oeis.org/A002387 in the Online Encyclopedia of Integer Sequences.

0
On

From the approximation

$$H_n\approx\ln n+\gamma$$

you draw

$$n\approx\lambda e^H$$ where $\lambda=e^{-\gamma}$.

Unfortunately, the next terms in the approxmation do not allow easy inversion.

0
On

In this paper, you will find very nice approxiamtions of the inverse of harmonic numbers.

All of them express in terms of Lambert function. For the simplest one, consider the expansion $$H_x=\gamma+\log \left({x}\right)+\frac{1}{2 x}+O\left(\frac{1}{x^2}\right)$$ Ignoring the higher order terms, $$x \sim -\frac{1}{2 W\left(-\frac{1}{2}e^{\gamma -H_x}\right)}$$ For illustraion purposes $$H_{10}=\frac{7381}{2520} \implies x=9.99124$$ $$H_{100}=\frac{14466636279520351160221518043104131447711}{27888150091884990865813523574124 92142272} \implies x=99.99916$$