# Finding the sum $\sum\limits_{n=1,n\neq m^2}^{1000}\left[\frac{1}{\{\sqrt{n}\}}\right]$,

Find the value $\displaystyle\sum_{n=2,n\neq m^2}^{1000}\left[\dfrac{1}{\{\sqrt{n}\}}\right]$,

by $\{x\}=x-[x]$, $[x]$was bracket function,for example:$[5.4]=5, [2.9]=2,[-1.1]=-2$and so on.

• What do you do when $\{\sqrt{n}\} = 0$? – Robert Israel Mar 10 '13 at 9:30
• @RobertIsrael That is not possible as long as n>=1 – lsp Mar 10 '13 at 9:34
• @lsp, isn't the fractional part of $\sqrt4$ equal to zero? – Gerry Myerson Mar 10 '13 at 9:35
• @GerryMyerson No, read $n\neq m^2$ – user45099 Mar 10 '13 at 9:35
• @user1709828, OK, but that wasn't there when Robert and I wrote our comments. It's still not in the title. – Gerry Myerson Mar 10 '13 at 9:36

The answer is 3843 as computed by brute force.

The rest is not the answer but interesting pieces I find related to this sum.

For $n^2 < x < (n+1)^2$, let $x = n^2 + k$, we have:

$$\left\lfloor\frac{1}{\{\sqrt{x}\}}\right\rfloor = \left\lfloor\frac{1}{\sqrt{n^2+k}-n}\right\rfloor = \left\lfloor\frac{\sqrt{n^2+k} + n}{k}\right\rfloor = \left\lfloor\frac{2n}{k}\right\rfloor$$ This gives: $$\sum_{x = n^2+1 }^{(n+1)^2-1} \left\lfloor\frac{1}{\{\sqrt{x}\}}\right\rfloor = \sum_{k=1}^{2n}\left\lfloor\frac{2n}{k}\right\rfloor = D(2n)$$

where $D(n) = \sum_{k=1}^{n} \left\lfloor\frac{n}{k}\right\rfloor = \sum_{k=1}^{n} d(k)$ is the Divisor summatory function which is basically a sum over $d(k)$, the number of divisors of $k$. The value of $D(n)$ is covered by the OEIS sequence A006218.

Notice for $n = 31$, the range $n^2+1, \ldots, (n+1)^2 - 1$ over cover the tail of our range of summation $1,\ldots, 1000$. For $1000 < x < 1024$, $k = x - n^2 > 39 \implies \left\lfloor\frac{2n}{k}\right\rfloor = 1$.
As a result:

\begin{align}\sum_{x=2,x\neq m^2}^{1000}\left\lfloor\dfrac{1}{\{\sqrt{x}\}}\right\rfloor &= \sum_{x=2,x\neq m^2}^{1023}\left\lfloor\dfrac{1}{\{\sqrt{x}\}}\right\rfloor - 23 = \sum_{n=1}^{31} \sum_{x=n^2+1}^{(n+1)^2-1}\left\lfloor\frac{1}{\{\sqrt{x}\}}\right\rfloor -23\\ &= \sum_{n=1}^{31}D(2n) - 23 = 3843 \end{align}

About the asymptotic behavior of the following sum as a function of $N$

$$\sum_{x=2,x\neq m^2}^{N}\left\lfloor\dfrac{1}{\{\sqrt{x}\}}\right\rfloor$$ Not much is known about that. At the heart of the summation, the exact asymptotic behavior of $D(x)$ is the famous unsolved Dirichlet Divisor Problem. The only thing we know is for large $x$,

$$D(x) = x\log x + x(2\gamma - 1) + O(x^\theta)$$

The best bound for $\theta$ known today is $131/464$ by Huxley (2003).