In an early paper, GH Hardy talks about the distribution of "curious" sum:

$$ \sum_{\nu \leq n } \{ \nu \theta \}^2 = \tfrac{1}{12} n + O(1)$$

where $\{x\}:=x-\left \lfloor x \right \rfloor -1/2$. With a computer it was not hard to verify the linear growth, the factor of $\frac{1}{12}$ or the constant error term. Here are my experiments:

The line is rather easy to prove with Weyl equidistribution theorem - without the $O(1)$ term.

$$ \frac{1}{n}\sum_{\nu \leq n } \{ \nu \theta \}^2 \approx \int_{-\frac{1}{2}}^{\frac{1}{2}} x^2 \, dx = \frac{1}{12} $$

Are there any easy ways to understand the noise? It clearly has no limit... in the figure $\theta = \sqrt{7}$ the $O(1)$ error term is distributed between 0.05 and 0.30 with clear bands at indeterminate values.

Obviously $\theta \notin \mathbb{Q}$ and even then the uncertainty might be too large.

I had computed the Fourier series in order to trace the proof of the Von Neumann ergodic theorem.

We can plot the sum of the sawtooth functions. The first 10 and the first 100 terms. The limit of $\sum_{\nu \leq n} \{ \nu \theta \}^2$ is highly oscillatory but does not converge at some points.

3more comments