# Why is $\lim\limits_{x\to\infty}\frac{\sum_{i=1}^x(\sum_{j=1}^i\frac1j-\ln i-\gamma)}{\sum_{i=1}^x\frac1i}=\frac12$?

$$\mbox{Why is}\quad\lim_{x\to\infty} \frac{\sum_{i = 1}^{x}\left[\sum_{j = 1}^{i}1/j -\ln\left(i\right)-\gamma\right]}{\sum_{i = 1}^{x}1/i} = \frac{1}{2}\ ?.$$

I learnt Euler's Constant $$\gamma$$ before, and I want to know the sum of $$H_k-\ln k-\gamma$$. As Wikipedia says, $$H_k=\ln k+\gamma+\varepsilon_k$$, where $$\varepsilon_k\sim\frac1{2k}$$. But I wonder how to prove it. By the following Mathematica program, I can check that this limit is $$\frac12$$. But I cannot prove it. Why is it not anything below or above $$\frac12$$?

Limit[Sum[Sum[1/j, {j, 1, i}] - Log[i] - EulerGamma, {i, 1, x}]/Sum[1/i, {i, 1, x}], x -> Infinity]

• I remembered someone has already answered you that you can use Stolz-Cesaro's lemma to answer your question. As far as I observe, his hint is correct, have you tried it? Jun 19, 2021 at 23:41
• @ParesseuxNguyen I see. That means the limit I want to calculate equals $\lim\limits_{x\to\infty}\frac{\sum_{i=1}^x\frac1i-\ln x-\gamma}{\frac1x}$, and as wiki says, $H_k=\ln k+\gamma+\varepsilon_k$, where $\varepsilon_k\sim\frac1{2k}$, so that equals $\lim\limits_{x\to\infty}\frac x{2x}=\frac12$. Jun 20, 2021 at 5:22
• Also note that reverse Cesaro stolz doesn't always hold true. Jun 20, 2021 at 6:57
• @Alex-Github-Programmer You may find this more general result interesting as well: math.stackexchange.com/q/3551025
– Gary
Jun 20, 2021 at 10:38

$$\quad\lim\limits_{x\to\infty}\frac{\sum_{i=1}^x(\sum_{j=1}^i\frac1j-\ln i-\gamma)}{\sum_{i=1}^x\frac1i}\\ =\liminf\limits_{i\to\infty}\frac{\sum_{j=1}^i\frac1j-\ln i-\gamma}{\frac1i}\\ =\limsup\limits_{i\to\infty}\frac{\sum_{j=1}^i\frac1j-\ln i-\gamma}{\frac1i}\\ =\lim \limits_{i\to\infty}\frac{\sum_{j=1}^i\frac1j-\ln i-\gamma}{\frac1i}\\ =\lim \limits_{i\to\infty}\frac i{2i}=\frac12$$.
(Since $$H_i-\ln i-\gamma\sim\frac1{2i}$$, so the last equality is right.)
• Why is $H_i-\log(i)-\gamma\sim\frac1{2i}$?