Prove the de la Vallée-Poussin's formula The Euler-Mascheroni constant is defined as $\gamma := \lim_{x\to\infty}(H_n - \ln\,n)$ where $H_n = \sum_{k=1}^{n}\frac{1}{k}$, and the de la Vallée-Poussin's formula states that:
$$\gamma = \lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n}\left(\left\lceil \frac{n}{k} \right\rceil - \frac{n}{k}\right)$$
How can one prove this formula? If the proof is too long for this site, could you give me the link to an article containing a proof of this fact?
Update: I did some work myself. Here it is:
We know that
$$\gamma=\lim_{n\to\infty}(H_{n}-\log n)$$
So we have to prove that
$$\lim_{n\to\infty}(H_{n}-\log n)=\lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n}\left(\left\lceil \frac{n}{k} \right\rceil - \frac{n}{k}\right)$$
Now
\begin{align}
\lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n}\left(\left\lceil \frac{n}{k} \right\rceil - \frac{n}{k}\right)&=\lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n}\left\lceil \frac{n}{k} \right\rceil-\lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n}\frac{n}{k}\\
&=\lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n}\left\lceil \frac{n}{k} \right\rceil-\lim_{n\to\infty}\frac{H_n}{n}
\end{align}
So we have to prove that
$$\lim_{n\to\infty}(H_{n}-\log n)=\lim_{n\to\infty}\frac{1}{n}\sum_{k=1}^{n}\left \lceil{\frac{n}{k}}\right \rceil-\frac{H_n}{n}$$
$$\implies \lim_{n\to\infty}(nH_{n}-\log n^{n})=\lim_{n\to\infty}\sum_{k=1}^{n}\left \lceil{\frac{n}{k}}\right \rceil-H_n$$
$$\implies \lim_{n\to\infty}((n+1)H_{n}-\log n^{n})=\lim_{n\to\infty}\sum_{k=1}^{n}\left \lceil{\frac{n}{k}}\right \rceil$$
How can I proceed further? Please mention in the comments, did I do something wrong?
Any help would be appreciated.
 A: With your current approach, you would have to split along the integers where $\left\lceil \frac{n}{k} \right\rceil$ is constant, which is unnecessarily complex.
Instead, using Riemann summation, the limit $$\lim_{n \to \infty} \frac{1}{n} \sum_{k=0}^n \left( \left\lceil \frac{n}{k} \right\rceil - \frac{n}{k} \right)$$
is $$\int_0^1 \left( \left\lceil \frac{1}{x} \right\rceil - \frac{1}{x} \right) \mathrm{d}x$$
More generally, $\lim_{n \to \infty} \frac{1}{n} \sum_{k=0}^n f\left( \frac{k}{n} \right) = \int_0^1 f(x) dx$. From here, split it into sections where $\left\lceil \frac{1}{x} \right\rceil = n$. Equivalently, this means that $$n-1 < \frac{1}{x} \le n \to \frac{1}{n} \le x < \frac{1}{n-1}$$ The integral would then be $$\sum_{n=2}^{\infty} \int_{\frac{1}{n}}^{\frac{1}{n-1}}\left( n - \frac{1}{x} \right) \mathrm{d}x$$
Evaluating the integral makes it $$\sum_{n=2}^{\infty}\left(n\left(\frac{1}{n-1}-\frac{1}{n}\right)-\ln\left(\frac{1}{n-1}\right)+\ln\left(\frac{1}{n}\right)\right)$$
After simplifying a bit, it is $$\sum_{n=2}^{\infty}\left(\frac{1}{n-1}+\ln\left(n-1\right)-\ln\left(n\right)\right) = \sum_{n=1}^{\infty}\left(\frac{1}{n}+\ln\left(n\right)-\ln\left(n+1\right)\right)$$
Let the upper bound on the sum be $x$. Then this is $$\lim_{x \to \infty} \sum_{n=1}^{x}\left(\frac{1}{n}+\ln\left(n\right)-\ln\left(n+1\right)\right)$$
The first term is $H_x$ and the rest telescopes to $\ln(1) - \ln(x+1) = -\ln(x+1)$. Altogether, the limit becomes $$\lim_{x \to \infty} \left( H_x - \ln(x+1) \right)$$
You can then add $\lim_{x \to \infty} \left( \ln(x+1)-\ln(x) \right) = 0$ to get $$\lim_{x \to \infty} \left( H_x - \ln(x+1) \right) + \lim_{x \to \infty} \left( \ln(x+1)-\ln(x) \right) = \lim_{x \to \infty} \left( H_x-\ln(x) \right)$$
which is exactly the original definition of the Euler-Mascheroni constant.
