# Limit of Series with differences of Floor function

Problem: Evaluate $$L=\displaystyle \lim_{n \to \infty} \frac{1}{n} \sum_{k=1}^{n} \left( \left\lfloor \frac{2n}{k} \right\rfloor -2\left\lfloor \frac{n}{k}\right \rfloor \right).$$

I tried using the sandwich theorem by first constructing the following $$2 \geq \left\lfloor \frac{2n}{k} \right\rfloor -2\left\lfloor \frac{n}{k} \right\rfloor \geq -1$$ and then summing over. But the limit of the two bounds are different so sandwich theorem doesn't help!. Is it possible to construct sharper bounds?

Also I observed that if we ignore question of continuity, etc. then we can write,

$$L= \displaystyle \int ^{1}_{0}\left\lfloor \frac{2}{x} \right\rfloor -2\left\lfloor \frac{1}{x} \right\rfloor dx$$ Now I am able to compute the above integral. But is the above process correct? If then how can make it rigorous? Or if any other approach is possible, please tell.

• In the integral representation of $L$ there should be no $n$. May 3 '16 at 9:18

With the change of variable $x=\frac{1}{z}$ we get:
$$L = \int_{1}^{+\infty}\frac{\lfloor 2z\rfloor -2\lfloor z\rfloor}{z^2}\,dx =\sum_{k\geq 1}\int_{k+\frac{1}{2}}^{k+1}\frac{dz}{z^2}=\sum_{k\geq 1}\frac{2}{(2k+1)(2k+2)}$$ hence:
$$L = 2\int_{0}^{1}\sum_{k\geq 1}\left(z^{2k}-z^{2k+1}\right)\,dz =\int_{0}^{1}\frac{2z^2}{1+z}\,dz=\color{red}{2\log 2-1}.$$