It is well known that size of the set of positive integers up to $n$ that can be written as $a^2+b^2$ is asymptotic to $C \frac{n}{\sqrt{\log n}}$. Here I'm interested mostly in the weaker fact that this set has density $0$.

The last can be proved by noticing that if $m$ is the sum of squares, it has no prime factor $p\equiv 3 (mod \,4)$ such that $p\mid m$ but $p^2\nmid m$. Therefore the density of such numbers is at most: $$\prod_{p\equiv_4 3} (1-\frac{p-1}{p^2})=0 $$

(more precise bounds on this product give the asymptotic $\frac{n}{\sqrt{\log n}}$)

This result is somehow unexpected, since it shows that sums of squares tend to "accumulate" in only a few places where there are many solutions to $m=a^2+b^2$.

However, this proof relies on "number theoretic" properties of $m=a^2+b^2$ rather than in the sumset structure of the squares, and it feels that if those number theoretic properties didn't exist, we would't be "lucky" that the sums of squares accumulate on average.

Perhaps the following problem would better grasp the sumset structure, since it very likely doesn't induce any prime factorization properties:

Let $\alpha$ a irrational number (say, $\alpha=\sqrt{2}$). Let $S$ the set of the integers $n$ such that the interval $[n,n+1)$ contains at least a number of the shape $a^2+\alpha b^2$ for integers $a,b$.

Is the density of $S$ positive?

Are there known techniques that solve the above problem? Or are there at least heuristics that answer it?

After all, is this accumulation of many sums in a few places a structure intrinsic to the distribution of the squares, or is it just a property that appeared "by chance"?

Thanks in advance.

3more comments