# Limit of a summation involving fractional parts

Working with some problems on the floor function, I noticed that the sum $$\frac {1}{n}\sum_{{\sqrt{n}}\leq x\leq n}\left\{\sqrt {x^2-n}\right\}$$

where $n$ and $x$ are integers, $\left\{f(x)\right\}$ denotes the fractional part of $f(x)$, and $n$ tends to $\infty$, seems to converge to $\approx 0.44...$. For example, for $n=10^6$, the sum gives $0.4414959...$. I would be interested to know whether there is a closed expression for this value. I tried to solve this starting from commonly used formulas involving the floor function, but failed to prove it.

• I just fixed my proof and found your limit. Enjoy. Jul 5, 2016 at 2:23

It is easier to compute: $$L=\lim_{m\to +\infty}\frac{1}{m^2}\sum_{m\leq x\leq m^2}\left\{\sqrt{x^2-m^2}\right\}=\lim_{m\to +\infty}\frac{1}{m^2}\sum_{0\leq x\leq m^2-m}\left\{\sqrt{x^2+2mx}-(x+m)\right\}. \tag{1}$$ Obviously the argument of the last fractional part is always negative, and the real solution of $\sqrt{x^2+2mx}-(x+m)=-1$ is given by $x=\frac{(m-1)^2}{2}$ and the real solution of $\sqrt{x^2+2mx}-(x+m)=-k$ is given by $x_k=\frac{(m-k)^2}{2k}$. By Riemann sums, our limit equals the limit of $\frac{1}{m^2}$ times $$\int_{x_1}^{m^2-m}\left(\sqrt{x^2+2mx}-(x+m)+1\right)\,dx + \int_{x_2}^{x_1}\left(\sqrt{x^2+2mx}-(x+m)+2\right)\,dx+\ldots$$ as $m\to +\infty$, i.e. $$\large\scriptstyle \lim_{m\to +\infty}\frac{1}{m^2}\left(\frac{m^2}{4} \left(1-2\log(2m)\right)+\frac{1}{16}+\frac{m^2-1}{2}+\sum_{k=1}^{m-1}(k+1)\left(\frac{(m-k)^2}{2k}-\frac{(m-k-1)^2}{2k+2}\right)\right)$$ that simplifies to: $$\lim_{m\to +\infty}\frac{1}{m^2}\left(\frac{m^2}{4} \left(1-2\log(2m)\right)+\frac{1}{16}+\frac{m^2-1}{2}+\frac{2m^2 H_{m-1}-m^2-m+2}{4}\right)$$ and finally to:
$$L=\color{red}{\frac{1+\gamma-\log 2}{2}}=0.44203424217\ldots$$
where $\gamma$ is the Euler-Mascheroni constant, due to the asymptotic formulas for harmonic numbers.
• @Anatoly: the sum of the integrals is given by $$\int_{0}^{m^2-m}\left(\sqrt{x^2+2mx}-(m+x)\right)\,dx$$ plus the contribute given by $\sum_{k=1}^{m-1}(2k)\cdot(\ldots)$, so there is a single integral to compute. It does not have a nice closed form, but its asymptotic behaviour for large $m$s is given by $$\frac{m^2}{4}(1-2\log(2m))+\frac{1}{16}+O\left(\frac{1}{m}\right)$$ that is the first term on the next line. Jul 5, 2016 at 12:29