Prove that $$\lim\limits_{k\to\infty}\left(\frac1k\sum\limits_{n=1}^k\left\lfloor\frac kn\right\rfloor-\ln k\right)=2\gamma-1$$
I have approximated this limit with python:
import math
len = 10000000000
ans = 0.0
x = 1
while (x<len):
ans += len/x
x = x + 1
ans = ans/len - math.log(len)
print ans
# this is the value i got for len = 10 billion: 0.154433
If anyone knows anything about this limit I would be extremely interested to hear about it. I came up with it when thinking about the Euler - Mascheroni Constant which is defined similarly.
The main difference here is the I have in a sense rounded the harmonics down to a values that form discrete intervals of [0,1].
It appears that this limit is one less than twice the Euler - Mascheroni Constant or at least very close according to the program I wrote. If anyone could prove this or suggest any ways I might attempt to do so that would be great.
Stated more clearly where L is the limit and γ is the Euler - Mascheroni Constant:
L = 2γ-1
Note that
$$\tag{1}\frac1k\sum\limits_{n=1}^k\left\lfloor\frac kn\right\rfloor-\ln k = -\frac1k\sum\limits_{n=1}^k\left(\frac{k}{n}-\left\lfloor\frac kn\right\rfloor\right)-\left( \sum_{n=1}^k \frac{1}{n} - \ln k\right).$$
We have
$$\lim_{k \to\infty}\left( \sum_{n=1}^k \frac{1}{n} - \ln k\right) = \gamma,$$
and the first term on the RHS of (1) is a Riemann sum converging to
$$\lim_{k \to\infty}-\frac1k\sum\limits_{n=1}^k\left(\frac{k}{n}-\left\lfloor\frac kn\right\rfloor\right) = - \int_0^1 \left\{\frac{1}{x} \right\}\, dx, $$
where $\{ \cdot \}$ denotes fractional part.
It remains to show that the integral equals $\gamma - 1$.
This follows from
$$\begin{align}\int_0^1 \left\{\frac{1}{x} \right\}\, dx &= \int_1^\infty \frac{\{y\}}{y^2}\, dy \\ &= \sum_{k=1}^\infty \int_k^{k+1} \frac{y-k}{y^2} \, dy \\ &= \sum_{k=1}^\infty \left( \ln \frac{k+1}{k} - \frac{1}{k+1}\right) \\ &= \lim_{n \to \infty} \sum_{k=1}^n \left(\ln \frac{k+1}{k} - \frac{1}{k+1} \right) \\ &= \lim_{n \to \infty} \left(\ln (n+1) - \sum_{k=1}^n \frac{1}{k+1}\right) \\ &= 1 - \gamma \end{align}$$
Thus,
$$\lim_{k \to \infty} \left(\frac1k\sum\limits_{n=1}^k\left\lfloor\frac kn\right\rfloor-\ln k \right) = \gamma -1 + \gamma = 2 \gamma -1$$