Intereting Posts

Show that $\sqrt{n^2+1}-n$ converges to 0
Is $512^3+675^3+720^3$ a composite number?
Integral operator is bounded on $L^p$ if it maps $L^p$ to itself
Complex prime numbers
Given a matrix $A$ of rank $n$, show that $\det(\operatorname{adj}(A))=\det(A)^{n-1}$ and $\operatorname{adj}(\operatorname{adj}(A))=(\det A)^{n-2}A$
Limit of the difference quotient of $f(x) = \frac{2}{x^2}$, as $x\rightarrow x_0$
How many triangles are there in the picture?
Proof of Nesbitt's Inequality: $\frac{a}{b+c}+\frac{b}{c+a}+\frac{c}{a+b}\ge \frac{3}{2}$?
cohomology of tensor product of a vector space with a double complex
Matrix Group induction proof and order of elements question
Probabilities of Non-Regular Dice
Three pythagorean triples
What structure does the set of all the matchings in a graph have?
Help with generating functions.
Baseball card problem

Let us consider the sum $$\displaystyle S_K=\sum_{n \geq \sqrt{K}}^{2 \sqrt{K}} \left\{ \sqrt {n^2-K} \right\} $$ where $K$ is a positive integer and where $\{ \}$ indicates the fractional part. If we calculate the average value of the difference between $S_K$ and $1/2 \, \sqrt{K}$ over all positive integers $K \leq N$, we have

$$\frac{1}{N} \sum_{K=1}^{N} \left( S_K- \frac{1}{2} \sqrt{K} \right)= O(1)$$

for $N \rightarrow \infty \,\,$. I am interested in this $O(1)$ term, which seems to be different from zero. Accordingly, studying the behaviour of the difference $S_K -1/2 \, \sqrt{K}\,\,\,$ over all integer values of $K$, its distribution is slightly shifted with respect to zero, and the average value seems to be $\approx -0.32… \,\,$. I tried several approaches to determine this constant term, mostly based on the Euler-Maclaurin formula, but without success. I wonder what this term is, and how it comes into this distribution.

- The fractional part of $n\log(n)$
- Another integral for $\pi$
- For $x\in\mathbb R\setminus\mathbb Q$, the set $\{nx-\lfloor nx\rfloor: n\in \mathbb{N}\}$ is dense on $[0,1)$
- Fractional part of rational power arbitrary small
- The graph of the function $f(x)= \left\{ \frac{1}{2 x} \right\}- \frac{1}{2}\left\{ \frac{1}{x} \right\} $ for $0<x<1$
- A sum of fractional parts.

EDIT: These are two graphs to better illustrate the question. The first one is a plot of the difference between $S_K$ and $1/2 \, \sqrt{K}\,$ vs $K$, for the first $10^4$ values of $K$. The black line is the best fitting one and is set at a value of $\approx -0.32$.

The second graph is a plot of the average value of $S_K – 1/2 \, \sqrt{K}\,$, calculated over the first $N$ positive integers, vs $N$. As expected according to the first graph, the average value of the difference converges towards $\approx -0.32$.

- Does every normal number have irrationality measure $2$?
- Probability that a natural number is a sum of two squares?
- Is $1992! - 1$ prime?
- Is it possible to cover $\{1,2,…,100\}$ with $20$ geometric progressions?
- A result of Erdős on increasing multiplicative functions
- Dirichlet hyperbola methods : estimate functions # of ordered pairs
- LCM of binomial coefficients and related functions
- Asymptotic formula for $\sum_{n\leq x}\mu(n)^2$ and the Totient summatory function $\sum_{n\leq x} \phi(n)$
- Linear congruence
- Probability and Data Integrity

The definition of $S_K$ is complicated, it is hard to figure out a full asymptotic expansion for it.

Let us look at a simpler one which we do know.

For any integer $p > 0$, consider following sum:

$$F(p) = \sum_{k=1}^p \{ \sqrt{k} \}

= \sum_{k=1}^p \sqrt{k} – \sum_{k=1}^p \lfloor \sqrt{k}\rfloor\tag{*1}

$$

Let $x = \sqrt{p}$, $t = \{ x \}$ and $m = x – t = \lfloor x \rfloor$.

For the first term on RHS of $(*1)$, it has following asymptotic expansion:

$$\sum_{k=1}^p \sqrt{k} \asymp

\frac23 x^3 + \frac12 x + \zeta\left(-\frac12\right) +

\frac{1}{24} x^{-1} -\frac{1}{1920} x^{-5} + \frac {1}{9216} x^{-9} +\cdots\tag{*2}

$$

See here for one way to derive this expansion.

For the second term, we can rewrite it as

$$\begin{align}

\sum_{k=1}^p \lfloor \sqrt{k}\rfloor

&= \sum_{k=m^2}^p m + \sum_{\ell=1}^{m-1}\sum_{k=\ell^2}^{(\ell+1)^2-1}\ell\\

&= (p – m^2 + 1)m + \sum_{\ell=1}^{m-1} (2\ell+1)\ell

= (p – m^2 + 1)m + \frac16 (m-1)m(4m+1)\\

&= (x-t)\left(x^2 – (x-t)^2 + 1 + \frac16(x-t-1)(4(x-t)+1)\right)

\end{align}\tag{*3}

$$

Substitute $(*2)$ and $(*3)$ into $(*1)$ and simplify, we obtain

$$F(p) = \frac12 p + A(t)\sqrt{p} + B(t) + \frac{1}{24} p^{-1/2} + \cdots\quad\text{where}\quad

\begin{cases}

A(t) = -(\frac13 + t – t^2)\\

B(t) = \zeta\left(-\frac12\right) + \frac56 t + \frac12 t – \frac13 t^3

\end{cases}

$$

Since $\displaystyle\;\int_0^1 A(t) dt = -\frac12 \ne 0$, even after

we subtract away the piece $-\frac12 p$, the sum

$$\sum_{k=1}^p \left( \{ \sqrt{k} \} – \frac12 \right) = F(p) – \frac12 p$$

is still systematically biased by a term of the form $-\frac12 \sqrt{p}$. This is the source of the $O(1)$ term you notice.

To see this, let us rewrite the sum at hand in terms of $F(p)$.

Let $\theta_K = \#\{ n \in \mathbb{Z}_{+} : \sqrt{K} \le n \le 2\sqrt{K} \}$,

the sum at hand can be rewritten as

$$\sum_{K=1}^N \left( S_K – \frac{1}{2}\sqrt{K} \right)

= \underbrace{\sum_{K=1}^N \sum_{\sqrt{K} \le n \le 2\sqrt{K}}\left(\left\{ \sqrt{n^2 – K} \right\} – \frac12\right)}_{\mathcal{I}}

– \underbrace{\frac12 \sum_{K=1}^N \left(\sqrt{K} – \theta_K\right)}_{\mathcal{J}}

$$

For the first term $\mathcal{I}$, we can express it using at most two $F(\cdot)$.

$$\begin{align}

\mathcal{I} &= \sum_{n=1}^{2\sqrt{N}}\sum_{\frac14 n^2 \le K \le \min( N, n^2 )}

\left(\left\{ \sqrt{n^2 – K} \right\} – \frac12\right)\\

&= \sum_{n=1}^{2\sqrt{N}}\sum_{ \max(0,n^2 – N)\le \ell \le \frac34 n^2}

\left(\left\{ \sqrt{\ell} \right\} – \frac12\right)\\

&= -\frac12\lfloor\sqrt{N}\rfloor + \sum_{n=1}^{2\sqrt{N}}\sum_{ \max(1,n^2 – N)\le \ell \le \frac34 n^2}

\left(\left\{ \sqrt{\ell} \right\} – \frac12\right) \\

&= -\frac12\lfloor\sqrt{N}\rfloor + \sum_{n=1}^{2\sqrt{N}}\left[ F(p) – \frac12 p \right]_{p = \max(0,n^2-N-1)}^{\lfloor \frac34 n^2\rfloor}

\end{align}

$$

For the second term $\mathcal{J}$, one can show

$$\sum_{K=1}^p \theta_K = \sum_{K=1}^p \left(\lfloor\sqrt{K}\rfloor + \frac12\right) + \frac12 | p – m(m+1) |$$

This implies $\mathcal{J}$ falls of like $\sqrt{N}$ and one can ignore them

in the final limit

$$\mathcal{J} = \frac12\sum_{K=1}^N \left(\sqrt{K} – \theta_K \right)

= \frac12( A(t) – \frac12|1-2t|)\sqrt{N} + O(1)\quad\text{ where }\quad t = \{\sqrt{N}\}$$

To proceed further, we will wave our hands. We will assume

- only the leading term $A(t)\sqrt{p}$ in $F(p) – \frac12 p$ matters.
- we can average out $A(t)$ over $t$, i.e. replace $A(t)\sqrt{p}$ by $-\frac12\sqrt{p}$
- we can approximate the sum over $n$ by an integral over $n$

Changing variable to $n = \sqrt{N}s$, we find

$$\begin{align}\frac1N\sum_{K=1}^N \left( S_K- \frac{1}{2} \sqrt{K} \right)

= \frac{\mathcal{I}}{N} + O (N^{-1/2})

&\approx

-\frac{1}{2N} \left[

\int_0^{2\sqrt{N}} \frac{\sqrt{3}}{2} n dn

– \int_{\sqrt{N}}^{2\sqrt{N}}\sqrt{n^2-N} dn\right]\\

&= -\frac{1}{2}

\left[ \frac{\sqrt{3}}{2} \int_0^{2} s ds

– \int_1^2 \sqrt{s^2 – 1}ds \right]\\

&= -\frac14\log(2+\sqrt{3}) \approx -0.3292394742312041

\end{align}

$$

A number compatible with what OP described in question.

- Sets, functions and relations problem
- Convergence Problem.
- Why is an open interval not a compact set?
- Proof that every number ≥ $8$ can be represented by a sum of fives and threes.
- Problem 4.3, I. Martin Isaacs' Character Theory
- Calculus in ordered fields
- $4$-digit positive integers that does not contain the digits $3$ and $4$ plus other properties
- Show that the angles satisfy $x+y=z$
- Proof that angle-preserving map is conformal
- Is there a name for the closed form of $\sum_{n=0}^{\infty} \frac{1}{1+ a^n}$?
- Limit of Ratio of Adjacent Fibonacci numbers $\to \phi$
- Prove that $(n+1)^{n-1}<n^n$
- Roots of a polynomial
- Some thinking about the Dini' s Theorem.
- study of subspace generated by $f_k(x)=f(x+k)$ with f continuous, bounded..