TITLE: Distribution of $a^2+\alpha b^2$
QUESTION [26 upvotes]: 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.

REPLY [26 votes]: There is a positive proportion of such integers and this follows from work on the Berry-Tabor conjecture due to Eskin, Margulis and Mozes (there is work by many others on this; see these papers for references).  Arrange the values of $a^2+\alpha b^2$ (for non-negative integers $a$ and $b$) in ascending order as $\lambda_1 \le \lambda_2 \le \ldots $.   Let's say that $\alpha$ is irrational, and doesn't have extremely good Diophantine approximations by rational numbers.  Then the Berry-Tabor conjecture predicts that this sequence behaves like random numbers thrown down with the appropriate mean spacing.  From this one can check that the number of integers $n$ that you want up to $N$ should be asymptotically 
$$ 
N \Big(1- \exp\Big(-\frac{\pi}{4\sqrt{\alpha}}\Big)\Big). 
$$ 
When $\alpha=\pi$ this proportion is $0.3579\ldots$, when $\alpha=e$ it is $0.3789\ldots$ and when $\alpha=\sqrt{2}$ it is $0.4833\ldots$; these match the numerics in the comments beautifully.  Towards the Berry-Tabor conjecture one can try to compute the pair-correlation of the $\lambda_j$'s (initiated by Sarnak) and this is what has been achieved by Eskin, Margulis and Mozes (see Theorem 1.7 of their paper), and this would allow the positive proportion lower bound.