Q:

Is there an easy way to find exact value of $\left\lfloor{H_{10^6}^\left({\frac12}\right)}\right\rfloor$ without using a calculator

Is there an easy way to calculate $f(x)=\left\lfloor{H_{x}^\left({\frac12}\right)}\right\rfloor$ for large $x\in\mathbb{N}$ where
$${H_{x}^\left({\frac12}\right)}=\sum_{n=1}^xn^{-\frac12}$$
without using a calculator? For example, how to calculate $f\left({10^6}\right)$? It is known that derivative of ${H_{x}^\left({\frac12}\right)}$ is monotonically decreasing for all real positive numbers and $f(x)<2000$ for all $0<x<10^6$. I computed $f\left({10^6}\right)$ using Mathematica and it is equal to $1998$, but is it possible to find it without using programs or calculators?

A:

According to this answer, the sum has
an asymptotic expansion of the form
$$\sum_{n=1}^x \frac{1}{\sqrt{n}} \approx 
2\sqrt{x} 
+ \zeta(1/2) 
+ \frac{1}{2\sqrt{x}}
-\frac{1}{24}{x}^{-3/2}+{\frac {1}{384}}\,{x}^{-7/2} + \cdots$$
If you want a quick answer for large $x$, you just keep the first two term in the
expansion and get $$f\left(10^6\right) \approx \left\lfloor 2\sqrt{10^6} -1.460354508809587 \right\rfloor = 1998$$

