How many numbers up to $x$ are sums of two squares?

201 Views Asked by At

I know that the primes which are representable as a sum of two squares are a specific type of prime, that is, $p=4k+1$, where $k$ is a positive integer.

and from this, I could deduce which integers are representable as a sum of two squares.

But I saw someone said "the number of integers which is less than $x$ and representable as a sum of two squares is $\frac{x}{\sqrt{\log x}}$.

I guess it has some relation with Pi function which counts how many primes up to given $x$.

But I don't know why it should be as above.

Here are my questions:

  1. It does not give the "exact" number of integers I desired, right?

  2. Why is it true for sufficiently large $x$? I'd like to know an intuitive argument.