# Elementary Proof of Landau's count on number representable as sum of two squares

In Analytic Number Theory by Iwaniec and Kowalski, there is an elementary proof of Landau's result of $\#\{n \le x: \exists a, b,\ s.t.\ n = a^2 + b^2\} \sim Cx/\sqrt{\log x}$ with an explicit constant $C$. However, it is left as exercise 4 in Chapter 1, and the hint is to use Thm 1.1. However, there is a restirction that $\kappa > -1/2$ in Thm 1.1, and if my calculations are correct, no matter whether I select primes congruent to 1 or 3 mod 4, I will have to take $\kappa = -1/2$ in Thm 1.1, which makes the error term as large as the main term. Of course the error term can be made smaller if we use PNT (basically the $O$ becomes $o$), but I feel that it is not the intended approach and is not quite "elementary". Does anyone have any hint?

• there is a complete proof in volume 2 of Topics in Number Theory by William J. LeVeque, available two volumes in one from Dover Publications. – Will Jagy Aug 8 '13 at 2:17
• store.doverpublications.com/0486425398.html – Will Jagy Aug 8 '13 at 2:51
• As far as I remember, this elementary proof first appeared in Selbergs work. I am certain the proof could be found in his writings, but I am not sure where. – Eric Naslund Aug 9 '13 at 16:13