Number Theory – Known Diophantine Equation for Complement of Sums of Two Squares

algebraic-number-theoryarithmetic-geometrydiophantine equationsnumber theory

It's well known by Legendre's Three Square Theorem that every natural number $n$ is either the solution of

$$ x^2 + y^2 + z^2 = n$$

Or

$$ 4^{a}(8b+7) = n$$

But not both, where $x,y,z,a,b$ are all integers.

I am interested in a similar question but for the sums of two squares. We know that every natural number that is a sum of 2 squares has an even exponent for its prime factors that are $3 \mod 4$ via the sum of two square's theorem.

Unfortunately I haven't seen a diophantine characterization of these numbers. For me a characterization involves a finite number of variables $x_1 … x_s$ and the operations $+,-,\times, /, \hat{\mkern6mu} $ and any complex numbers. At least OEIS doesn't seem to have one. Is anything known about this? If not a single equation then is there some FINITE set of diophantine equations $e_1, e_2 … e_r$ such that every natural number that is not the sum of 2 squares is a solution to ONE of the equations of that FINITE set $e_i$ and not any other?

In other words do we have any way to characterize exactly the complement of the sums of 2 squares by diophantine equations?

Best Answer

If an odd natural number $n$ is not a sum of two integer squares then either $$4a+3=n,$$ has a solution $a\in\Bbb{Z}$, or else the system \begin{eqnarray} (4a+3)(4b+3)&=&n,\\ (4a+3)x+(4b+3)y&=&1, \end{eqnarray} has a solution $a,b,x,y\in\Bbb{Z}$. Conversely, if this system does not have integral solutions for an odd integer $n$, then $n$ is a sum of two squares. To extend this characterization to all natural numbers $n$, simply take \begin{eqnarray} 2^k(4a+3)&=&n,\\ \text{ or }\\ 2^k(4a+3)(4b+3)&=&n,\\ (4a+3)x+(4b+3)y&=&1. \end{eqnarray}

Related Question