# Angular equidistribution of lattice points on circles

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:

1. 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.)

2. 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?

• Don't know anything about equidistribution in dimension 2, I see it is not unconditionally true. Linnik did dimension 3, this was generalized to arbitrary positive ternary forms by Duke and Schulze-Pillot, and there are specific (spinor genus) conditions. By dimension 5, there are no longer anisotropic primes, so all should be true without conditions. Dimension 4 still, just barely, has anisotropic primes, essentially quaternion algebras. Mar 9 '14 at 20:49
• @Yoni, the discrepancy statement is not equivalent to equidistribution, but stronger, as you have uncountably many arcs. Moreover, when people use discrepancy, they usually aim for quantitative estimates, and uniform estimates on discrepancy are hard (you want you function to be "localized" i.e. be characteristic function of a small arc, but being such, you will need to go over to a higher Sobolev norm in the estimates for the Fourier coefficients, which somehow will contradict the uniformity (because usually one uses Sobolev's estimate to truncate down the higher modes)).
– Asaf
Mar 10 '14 at 6:46
• Will, thanks, but I still don't understand why the dim 2 (with much easier analysis then the higher dimensions) was "not known" in the 50s... Asaf, I did not define equidistribution above, but using what I think is the standard definition (equidistribution mod $2\pi$ of the complex arguments) it's equivalent to $\Delta \to 0$ (Theorem 1.1 in chapter 2 of Uniform Distribution of Sequences by Kuipers & Niederreiter). Mar 10 '14 at 7:50
• @Yoni, about the discrepancy OK, it follows from the fact that one have countable dense sub-sigma algebra (say generated by dyadic intervals or so). At any case, when one refers to discrepancy, one usually wants a quantitative statement, and the Sobolev estimate won't work naively with more and more localized functions (in principle, as Sarnak usually says, its a question about the level of distribution of the sequence, as seen in the corresponding Weyl sums). I'll write something about the higher dimensions in the next comment.
– Asaf
Mar 10 '14 at 10:27
• I don't know what exactly you're looking for, but you could see this other paper of Cilleruelo journals.cambridge.org/… which also shows that most of the time one gets small discrepancy. In particular look at Proposition 3.1 which gives a description of numbers for which the discrepancy is small. Mar 14 '14 at 1:42

If $p\equiv 1 \pmod 4$ then we may write $p=a^2+b^2$ in a unique way with $a$, $b$ both positive and $b< a$. Corresponding to such a representation, write $a+bi = \sqrt{p} e^{i\theta(p)}$ with $\theta(p) \in (0,\pi/4)$.
If now $n=p_1\cdots p_k$ (assume for simplicity that $n$ is odd and square free) where the $p_j$'s are $1\pmod 4$, then by multiplying $\sqrt{p_j}e^{\pm i\theta({p_j})}$ we find many representations of $n$ as a sum of two squares, and the angles corresponding to these representations are $\sum_{j} \epsilon_j \theta(p_j)$ where $\epsilon_j=\pm 1$. We can also multiply these representations by $\pm 1$ and $\pm i$ at the end, but that clearly doesn't affect our discussion. The problem then is about the equidistribution of the angles $\sum_{j=1}^{k} \epsilon_j \theta(p_j)$ when we vary $\epsilon_j$ over all the $2^k$ possible choices of sign.
Now suppose there is some subset of the $\theta(p_j)$ (say $\{ \theta(p_1), \ldots, \theta(p_\ell)\}$) which is equidistributed in $(0,\pi/4)$ (that is $\ell$ is large, and the discrepancy of these points for arcs in $(0,\pi/4)$ is small).
Then using Weyl's criterion (or the Erdos-Turan discrepancy bound) one can see that the points $\sum_{j=1}^{\ell} \epsilon_j \theta(p_j)$ will get equidistributed $\pmod{2\pi}$ (that is the discrepancy will be small). Since the points in $\sum_{j=1}^{k} \epsilon_j \theta(p_j)$ are $2^{k-\ell}$ translates of this equidistributed set, it follows that they too are equidistributed. This gives a criterion for when you should expect equidistribution of angles, and is essentially the criterion used in Cilleruelo's paper referenced in my comment. Since most numbers have a lot of prime factors, and $\theta(p)$ is equidistributed in $(0,\pi/4)$ as $p$ runs over all primes, this criterion can be used to show angular equidistribution for almost all numbers that are sums of two squares. As a concrete example, if $N= \prod_{p\le z, p\equiv 1\pmod 4} p$ then it follows that the angles corresponding to representations of $N$ as a sum of two squares are equidistributed (as $z\to \infty$).
On the other hand, if the points $\theta(p_j)$ (for $1\le j\le k$) all accumulate near rational numbers with the same denominator, then one will not get equidistribution. Thus for example if all the $\theta(p_j)$ are small, then one has non-uniform distribution, and this is what Cilleruelo does to produce examples with high discrepancy.
• Thank you! This explains why one cannot hope for any criterion which doesn't care very much about the angular distribution of some set of prime factors that are $1 \pmod 4$. I've read the criterion in Cilleruelo's second paper, but this finally clarifies what's going on. Mar 21 '14 at 9:47