Define
$$S(x) ~=~ \# \left\{ n^2+m^2\leq x : n,m\in\mathbb{N}\right\}$$
Landau (1908) proved that with
$$ B(x) ~=~ K\,\frac{x}{ \sqrt{\log x}} ~~\text{ one has}~~~ \lim \limits_{x\to \infty} \frac{S(x)}{B(x)}~=~1,$$
where $K$ is the
Landau-Ramanujan constant.
Because
$$ a= n^2 +m^2 \Leftrightarrow 4\,a= (2n)^2 +(2m)^2,$$
one can immediately derive for the number of sums of two even squares
$$S_0(x) ~=~ \# \left\{ (2n)^2 +(2m)^2\leq x : n,m\in\mathbb{N}\right\},$$
that $S_0(4 x)=S(x)$, and consequently for $\epsilon>0$ and sufficiently large $x$
$$S_0(x) \geq \frac{K}{4+\epsilon}\,\frac{x}{ \sqrt{\log x}}. $$
Question: Is there a similarly simple argument to bound
$$S_1(x) ~=~ \# \left\{ (2n-1)^2 +(2m-1)^2\leq x : n,m\in\mathbb{N}\right\}?$$
1 Answer
A number $n$ is a sum of two squares if and only if $2n$ is (this goes back to Fermat and Euler). This implies $$S_{\text{even}}(x):=|\{n^2+m^2: n,m \ge 0, \, n^2+m^2 \le x,\, n^2+m^2 \text{ even}\}| =S(x/2).$$ If $n^2+m^2$ is even then $n$ and $m$ have the same parity. The number of $n^2+m^2$'s where $n$ and $m$ are even is, as you observed, $$S_{0}(x):=|\{n^2+m^2: n,m \ge 0, \, n^2+m^2 \le x,\, n\text{ and }m \text{ even}\}| =S(x/4)$$ since we can divide $n$ and $m$ by $2$. This means that $$S_1(x) \ge S_{\text{even}}(x) - S_{0}(x) = S(x/2)-S(x/4) \sim S_{0}(x).$$
In fact $S_1(x) = S_{\text{even}}(x) - S_{0}(x)$, because $n^2+m^2$ is congruent to $0$ modulo $4$ when $n,m$ are both even and is congruent to $2 $ modulo $4$ when $n,m$ are both odd, so the sets counted by $S_{0}$ and $S_1$ do not intersect.
-
1$\begingroup$ Nice answer! But why do you write $S_1(x)\ge S_{even}(x) - S_0(x)$ instead of equality? $\endgroup$ Commented Oct 10, 2023 at 14:39
-
-
$\begingroup$ Very nice, thanks! Of course $ 2\,(n^2 +m^2) =(n+m)^2 +(n-m)^2$. $\endgroup$ Commented Oct 10, 2023 at 16:52
-
2$\begingroup$ @KarlFabian This shows that if $r$ is a sum of two squares, so is $2r$. Conversely, if $2r$ is a sum of two squares $a^2+b^2$ then $a,b$ must be of the same parity and so $r=((a+b)/2)^2+((a-b)/2)^2$ is also a sum of two squares. $\endgroup$ Commented Oct 10, 2023 at 17:41