Find $L=\lim_{n\to \infty }\frac{1}{n}\sum_{k=1}^{n}\left\lfloor 2\sqrt{\frac{n}{k}} \right\rfloor -2\left\lfloor \sqrt{\frac{n}{k}} \right\rfloor$

Question:- Find Limit $$L=\lim_{n\to \infty }\frac{1}{n}\sum_{k=1}^{n}\left\lfloor 2\sqrt{\frac{n}{k}} \right\rfloor -2\left\lfloor\sqrt{\frac{n}{k}} \right\rfloor \text ,$$ where $$\lfloor x \rfloor$$ represents greatest integer function.

Yesterday, my friend sent me this limit question.Greatest integer function is the biggest problem here.I don't know how to evaluate the summation to find the given limit.

Can anybody help me!!

• Convert this into a Riemann sum, then: math.stackexchange.com/questions/3749611/… – Nikunj Jul 8 '20 at 17:39
• @Nikunj I don't see how to convert it to a Riemann sum. The interval of integration would go from $1$ to $n$. – saulspatz Jul 8 '20 at 17:56
• No, $x = k/n$, would go from $0$ to $1$ as $k$ goes from $1$ to $n$ – Nikunj Jul 8 '20 at 18:00
• @Nikunj Oh, duh. Yes, you're right. – saulspatz Jul 8 '20 at 18:09

$$\int_0^1 \left \lfloor \frac2{\sqrt x} \right \rfloor -2\left \lfloor\frac1{\sqrt x} \right \rfloor\,dx$$ Put $$\sqrt x \rightarrow 1/t$$ to get: $$= 2\int_1^\infty \frac{\left \lfloor 2t \right \rfloor}{t^3} -2\frac{\left \lfloor t \right \rfloor}{t^3}\,dt$$ $$= 2\left(\sum_{r=1}^\infty\int_{(r+1)/2}^{r/2 + 1}\frac{r+1}{t^3}\,dt - 2\sum_{r=1}^\infty\int_{r}^{r + 1}\frac{r}{t^3}\,dt\right)$$ $$= 2\sum_{r=1}^\infty\left(\frac{2(2r+3)}{(1+r)(2+r)^2} - \frac{2r+1}{r(1+r)^2}\right)$$
$$= 2\sum_{r=1}^\infty\left(\frac{4}{(r+1)(r+2)} - \frac{2}{(r+1)(r+2)^2} - \frac{2}{r(r+1)} + \frac{1}{r(1+r)^2}\right)$$ $$= 2\sum_{r=1}^\infty\left(\frac{1}{r(1+r)^2}-\frac{2}{(r+1)(r+2)^2}\right)$$ $$= 1 - 2\sum_{r=1}^\infty\left(\frac{1}{r(1+r)^2}\right)$$ $$= \boxed{\frac{\pi^2}3 - 3}$$