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).$$
Please help me with this one.
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.
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: