The following question is well known:

Consider representations of a given integer as sums of two squares, i.e. solutions to $a^2 + b^2 = n$ in $a,b\in\mathbb Z$ with $n$ fixed. As $n \to \infty$, are the normalized points $\left(\frac a {\sqrt n}, \frac b {\sqrt n}\right)$ uniformly distributed on the unit circle?

An equivalent formulation is given by:

Denote by $\Delta(n)$ the

discrepancy$$\Delta(n) = \sup_{\Gamma\text{ arc on }\mathcal S^1} \left|\frac {\text{number of points for }n\text{ in }\Gamma}{\text{number of points for }n} - \frac {\text{Length}(\Gamma)} {2\pi}\right|$$ Then as $n \to \infty$, is it true that $\Delta(n) \to 0$?

The answer is "it depends on what you mean by $n \to \infty$". Obviously, for many $n$ there are no points at all or a small number of points. Even if we require the number of points to grow to infinity, a counterexample was constructed by J. Cilleruelo in *The distribution of the lattice points on circles, J. Number Theory 43 (1993), no. 2, p. 198-202*.

An answer in the positive direction is given by Erdős and Hall in *On the angular distribution of Gaussian integers with fixed norm, Discrete Math 200 (1999), p. 87-94*. The formulation is something like this (which I reproduce here in a simplified fashion):

For "almost all" integers $n \le x$ that are representable as a sum of two squares, we have $\Delta(n) \le \log ^{-\kappa} x$, where $\kappa > 0$ is an absolute constant.

A similar result (with essentially the same analysis) was given earlier by Kátai and Környei in *On the distribution of lattice points on circles, Ann. Univ. Sci. Budapest., Sect. Math. 19 (1977), p. 87-91*.

I have two questions:

The analysis done by Erdős and Hall and by Kátai and Környei is based on an averaging argument. This means they say nothing about which $n$ give low discrepancy, only that most $n$ do. Is there a known result that gives criteria on $n$ to ensure low discrepancy? (In contrast, Cilleruelo's counterexample construction gives a criterion to ensure

*high*discrepancy.)It seems odd to me that this result is so recent (1999 or even 1977): It has been done in higher dimensions, which seems a lot harder, in 1959 (Pommerenke), and in this MathOverflow question a reference to a similar problem was given from 1920.

Is this "folklore question" - if so, what is "new" about the more recent results? Could you give me a reference for the simplest way to solve the problem if what I want is to show that for "many sequences of integers" $n \to \infty$ (preferably, with description) we have $\Delta(n) \to 0$, and I don't care about the speed of convergence?

On the other hand, if this indeed is a new result - how come it wasn't known in the 1950s?

Uniform Distribution of Sequencesby Kuipers & Niederreiter). – Yoni Rozenshein Mar 10 '14 at 7:50