Originally Posted by

**Swlabr** I encountered this in a book yesterday (de la Harpe, if you're interested) when I was a tad bored and I decided to "understand" the proof. It stated,

If we take $\displaystyle R(t) = |\{ (a,b) \in \mathbb{Z}^2 : a^2+b^2 \leq t\}|$ then $\displaystyle R(t) - \pi t = E(\sqrt{t})$.

The first part of the proof is simple: take the unit square with $\displaystyle (a,b)$ in its south-west corner. Then in even a worst case we see that the square is contained in the circle with center (0,0) and radius $\displaystyle \sqrt(2)+\sqrt(t)$ (just applying Pythagoras to the two squares that we find ourselves with and summing). Applying the area of a circle formula, we get $\displaystyle R(t) \leq \pi (\sqrt(2) + \sqrt(t))^2 = \pi (2+2 \sqrt{2t} + t) \Rightarrow R(t) - \pi t \leq 2 \pi (1 + \sqrt{t})$ for all $\displaystyle t \geq 0$.

This is where I think we should stop. I mean, that is the statement in the Theorem, isn't it? However, the author then says "if the square corresponding to $\displaystyle (a,b)$ touches the disc of radius $\displaystyle \sqrt{t} - \sqrt{2}$, then $\displaystyle a^2+b^2 \leq t$; hence

$\displaystyle R(t) \geq \pi (\sqrt{t} - \sqrt{2})^2$

for all $\displaystyle t \geq 0$. Thus

$\displaystyle |R(t) - \pi t| \leq 2 \pi (1+\sqrt{2t})$

for all $\displaystyle t \geq 0$. Ends."

and I don't really see what we are doing continuing. I don't see what we are trying to prove, or how we get the absolute value sings.

Thanks in advance!