1

Motivation

I'm looking for a fast way to calculate the integer part of the sum of square roots of natural numbers.

Some sources give an asymptotic series as follows:

$$ \sum_{x=1}^n \sqrt{x}∼ζ\left(-\frac{1}{2}\right)+\frac{2}{3}n^{3/2}+\frac{1}{2}n^{1/2}+\frac{1}{24}n^{-1/2}-\frac{1}{1920}n^{-5/2}+O\left(n^{-9/2}\right) $$

I was surprised to find that when expanded to -1/2 order, there seems to be:

$$ \left\lfloor \sum_{x=1}^n \sqrt{x}\right\rfloor \overset{?}{=}\left\lfloor ζ \left(-\frac{1}{2}\right) +\frac{\sqrt{n}}{2}+ \frac{2}{3}n\sqrt{n}+\frac{1}{24\sqrt{n}}\right\rfloor. $$

But if this order is missing, the equal sign cannot be obtained when $n=1$ and $n=156$.

And expanding more terms to order $n^{-5/2}$ will have the same unequal points.

Question

Can equality be proved or disproven when expanding to $n^{-1/2}$?

Aster
  • 1,315

1 Answers1

1

Just take more terms $$\sum_{x=1}^n \sqrt{x}=\frac{2 n^{3/2}}{3}+\frac{\sqrt{n}}{2}+\zeta \left(-\frac{1}{2}\right)+\frac{1}{24\sqrt n} \Big[\cdots\Big]$$ where $$ \Big[\cdots\Big]=1-\frac{1}{80 n^2}+\frac{1}{384 n^4}-\frac{33}{20480 n^6}+\frac{65}{32768 n^8}+O\left(\frac{1}{n^{10}}\right)$$

If you take the term to $O\left(\frac{1}{n^{6}}\right)$, at least for $n \leq 1000$ the difference of the floor functions is $0$.

If you take the term to $O\left(\frac{1}{n^{4}}\right)$, at least for $n \leq 1000$ the difference of the floor functions is $0$;

But, as you notices, taking the term to $O\left(\frac{1}{n^{2}}\right)$ , there is a problem for $n=1$