TITLE: Sums of two squares: What is known about the distribution of r(n)?
QUESTION [10 upvotes]: The distribution of sums of two squares has been studied by Landau. What is known about the distribution of the function $r(n)$, the number of representations of $n$ as the sum of two squares? Some specific questions of interest to us are these. Suppose $a \leq n\leq b$. What is the average value of $r(n)$? What is the standard deviation?  
Edit: Thanks for the answer and comments. I am particularly interested in the range $a\leq n\leq b$ where $b-a = \Theta(\sqrt{a})$.  Let $a,b$ be like that, and let $C(n)$ be the circle of radius $n$ around a fixed center.
Conjecture. The number of integers $n\in[a,b]$ with $r(n)>0$ is $\Omega(\sqrt{a})$. Furthermore, if $S$ is the segment of $C(b)$ cut off by a chord of length $\Omega(\sqrt{a})$ that touches $C(a)$ and if $r_S(n)$ is the number of lattice points in $C(n)\cap S$ then the number of integers $n\in[a,b]$ with $r_S(n)>0$ is $\Omega(\sqrt{a})$.
Added: Finally, with the help of Greg Martin, I got hold of relevant literature and educated myself. Thank you again for the useful answers and comments!

REPLY [8 votes]: I don't believe your new conjecture is true. Taking $b=a+\sqrt a$ for concreteness: standard sieve results show that the number of integers in $[a,b]$ that can be represented as the sum of two squares is $O(\sqrt{a/\log a})$. (This is closely related to the fact that the counting function of the sums of two squares is asymptotic to a constant times $x/\sqrt{\log x}$.)