Conjecture: The sequence $\frac{2}{n} \sum_{i=1}^n \sqrt{\frac{n}{i-\frac{1}{2}}-1}$ converges to $\pi$ I found that the series
$$s(n) = \frac{2}{n} \cdot \sum_{i=1}^n \sqrt{\frac{n}{i-\frac{1}{2}}-1}$$
converges to $\pi$ as $n \to \infty$.
To verify this I have computed some values:




$n$
$s(n)$




$10^1$
2.76098


$10^3$
3.10333


$10^5$
3.13776


$10^6$
3.14038


$10^7$
3.14121




Which seems to support the claim, however, this is no proof of the convergence.
I would not know how to begin on a proof of this limit and did not find any similar formula in known approximation formulas.
Does anyone have an idea on how such a proof can be constructed?
 A: I shall derive a complete asymptotic expansion for $s(n)$. The argument is analogous to the one given here. First note that
\begin{align*}
\frac{n}{2}s(n) & = \sum\limits_{i = 1}^n {\sqrt {\frac{n}{{i - 1/2}} - 1} }  = \sum\limits_{i = 1}^n {\sqrt {\frac{{2n - 2i + 1}}{{2i - 1}}} } \\ & = [x^{2n} ]\left( {\sum\limits_{k = 1}^\infty  {\frac{{x^{2k} }}{{\sqrt {2k - 1} }}} } \right)\left( {\sum\limits_{k = 0}^\infty  {\sqrt {2k + 1} x^{2k} } } \right)
\\ &  = [x^{2n - 1} ]\left( {\chi _{1/2} (x)\frac{{{\rm d}\chi _{1/2} (x)}}{{{\rm d}x}}} \right) = \frac{1}{2}[x^{2n - 1} ]\frac{{{\rm d}\chi _{1/2}^2 (x)}}{{{\rm d}x}}
\\ & = \frac{1}{2}\frac{1}{{(2n - 1)!}}\left[ {\frac{{{\rm d}^{2n} \chi _{1/2}^2 (x)}}{{{\rm d}x^{2n} }}} \right]_{x = 0}  = \frac{n}{{2\pi {\rm i}}}\oint_{(0 + )} {\frac{{\chi _{1/2}^2 (z)}}{{z^{2n + 1} }}{\rm d}z} ,
\end{align*}
where $\chi$ is the Legendre $\chi$-function and $[x^n]$ is the $n$th coefficient extraction operator. Therefore,
$$
s(n) = \frac{1}{{\pi {\rm i}}}\oint_{(0 + )} {\frac{{\chi _{1/2}^2 (z)}}{{z^{2n + 1} }}{\rm d}z} 
$$
for any $n\ge 1$. The function $\chi _{1/2}^2(z)$ is analytic on $\mathbb{C}\setminus ((-\infty,-1] \cup [1,+\infty))$ and is $\mathcal{O}(\log z)$ for large $|z|$. Therefore, we can blow up the contour of integration to arrive at
$$
s(n) = \frac{1}{{\pi {\rm i}}}\int_{\mathscr{H}^-} {\frac{{\chi _{1/2}^2 (z)}}{{z^{2n + 1} }}{\rm d}z} + \frac{1}{{\pi {\rm i}}}\int_{\mathscr{H}^+} {\frac{{\chi _{1/2}^2 (z)}}{{z^{2n + 1} }}{\rm d}z} ,
$$
where the contours $\mathscr{H}^-$, $\mathscr{H}^+$ are Hankel contours surrounding $(-\infty,-1]$ and $[1,+\infty)$ in the clockwise sense. Since $\chi _{1/2}^2(z)$ is even, we can simplify the above to
$$
s(n) = \frac{2}{{\pi {\rm i}}}\int_{\mathscr{H}^+} {\frac{{\chi _{1/2}^2 (z)}}{{z^{2n + 1} }}{\rm d}z}.
$$
Substituting $z=\mathrm{e}^w$,
$$
s(n) = \frac{2}{{\pi {\rm i}}}\int_\mathscr{H} {{\rm e}^{ - 2nw} \chi _{1/2}^2 ({\rm e}^{w} ){\rm d}w} 
$$
where $\mathscr{H}$ is a Hankel contour surrounding the positive real line in the clockwise sense. Collapsing the contour onto the two sides of the positive real axis and extracting the contribution coming from the origin, we find
$$
s(n) = \pi  + \int_0^{ + \infty } {{\rm e}^{ - 2nt} f(t){\rm d}t} 
$$
with
$$
f(t): = \mathop {\lim }\limits_{\varepsilon  \to 0^ +  } \frac{2}{{\pi {\rm i}}}\left[ {\chi _{1/2}^2 ({\rm e}^{t + {\rm i}\varepsilon } ) - \chi _{1/2}^2 ({\rm e}^{t - {\rm i}\varepsilon } )} \right].
$$
The contribution from the origin follows from the series expansion
$$
\chi _{1/2} ({\rm e}^w ) = \frac{1}{2}\sqrt {\frac{\pi }{{ - w}}}  + \sum\limits_{k = 0}^\infty  {(1 - 2^{k - 1/2} )\zeta (1/2 - k)\frac{{w^k }}{{k!}}} 
$$
valid for $0<|w|<\pi$. This may be deduced from the relation
$$
\chi _{1/2} ({\rm e}^w ) = \operatorname{Li}_{1/2} ({\rm e}^w ) - \frac{1}{{\sqrt 2 }}\operatorname{Li}_{1/2} ({\rm e}^{2w} )
$$
with the polylogarithm and the analogous series expansion of the latter. From this series it is readily found that
$$
f(t) = \frac{4}{{\sqrt \pi  }}\sum\limits_{k = 0}^\infty  {(1 - 2^{k - 1/2} )\zeta (1/2 - k)\frac{{t^{k - 1/2} }}{{k!}}} 
$$
for $0<|t|<\pi$. Hence, by Watson's lemma,
$$\boxed{
s(n) \sim \pi  + 2\sum\limits_{k = 0}^\infty  {\binom{k-1/2}{k}(2^{1/2 - k}  - 1)\zeta (1/2 - k)\frac{1}{{n^{k + 1/2} }}} }
$$
as $n\to +\infty$.
A: Note that: $$\frac{1}{n}\sum_{k=1}^n\sqrt{\frac{1}{k/n-1/2n}-1}\to\int_0^1\sqrt{x^{-1}-1}\,\mathrm{d}x=\frac{\pi}{2}$$
Substituting $x=t^{-1},t=u+1,u=w^2$ in that order equates the integral with: $$2\int_0^\infty\frac{w^2}{(w^2+1)^2}\,\mathrm{d}w$$And this is manageable.
Or, let $x=\sin^2t$. You then deal with: $$\int_0^{\pi/2}2\sin(t)\cos(t)\cot(t)\,\mathrm{d}t=2\int_0^{\pi/2}\cos^2t\,\mathrm{d}t$$Which is even easier.

To justify treating the partial sums as Riemann sums, it is sufficient to demonstrate: $$\lim_{n\to\infty}S_n=\lim_{n\to\infty}\left[\left(\frac{1}{n}\sum_{k=1}^n\sqrt{\frac{n}{k-\frac{1}{2}}-1}\right)-\left(\frac{1}{n}\sum_{k=1}^n\sqrt{\frac{n}{k}-1}\right)\right]=0$$
I present a proof of this by elementary bounds. No need for fancy convergence theorems here!
Using the difference of two squares we can bound, for every $k\le 1$ and every $n\ge k$: $$\begin{align}0&\le\sqrt{\frac{n}{k-\frac{1}{2}}-1}-\sqrt{\frac{n}{k}-1}\\&=\frac{\frac{\frac{1}{2n}}{\frac{k}{n}\left(\frac{k}{n}-\frac{1}{2n}\right)}}{\sqrt{\frac{n}{k-\frac{1}{2}}-1}+\sqrt{\frac{n}{k}}}\\&\le\frac{1}{2}\sqrt{\frac{k}{n}}\cdot\frac{n}{k(2k-1)}\\&=\frac{1}{2}\frac{\sqrt{n}}{(2k-1)\sqrt{k}}\\&\le\frac{\sqrt{n}}{2k\sqrt{k}}\end{align}$$Summing in $k$ and dividing by $n$ finds: $$0\le S_n\le\frac{1}{2\sqrt{n}}\sum_{k=1}^nk^{-3/2}\le\frac{1}{2\sqrt{n}}\left(3-\frac{2}{\sqrt{n}}\right)$$
Where we bounded the sum by the integral $\int x^{-3/2}\,\mathrm{d}x$ to get that last bound. By the squeeze theorem, it is now clear that $S_n$ vanishes - as desired.
