Fact13.2.1
If an odd number \(N\) is writeable in two essentially different (nonnegative) ways as a sum of two squares, then \(N=yz\), where \(y,z>1\) and \(y,z\) are themselves writeable as two squares' sum.
Most of the rest of this chapter is dedicated to proving what we can about how to write numbers as sums of squares. We will begin our proofs by talking about how many ways we can write some numbers as a sum of squares. Namely, we'll connect sums of squares to factorization.
Remember that the Brahmagupta-Fibonacci identity says that if two numbers are in sums of two squares, so is their product. Remarkably, we can sort of do this backwards.
First, we need to say what we might mean as writing a number as a sum of squares in two essentially different ways. Compare \begin{equation*}13=3^2+2^2=2^2+3^2\end{equation*} to the situation \begin{equation*}25=5^2+0^2=3^2+4^2\end{equation*} We say the latter ways are essentially different. Now we see how to
If an odd number \(N\) is writeable in two essentially different (nonnegative) ways as a sum of two squares, then \(N=yz\), where \(y,z>1\) and \(y,z\) are themselves writeable as two squares' sum.
For \(N=25\), what are \(a,b,c,d\)?
Then \(k=\gcd(2,4)=2\), \(n=\gcd(8,4)=4\) which means \(\ell=1\) and \(m=2\), yielding \begin{equation*}25=\left[\left(\frac{2}{2}\right)^2+\left(\frac{4}{2}\right)^2\right]\left(1^2+2^2\right)=5\cdot 5\end{equation*}
And so \(25\) is a product of numbers themselves writeable as a sum of two squares.
It is now nearly trivial to prove the following.
A prime is writeable in zero or one (positive) way as a sum of two squares.
We can see this visually below, in that each of the circles with radius square root a prime either has no lattice points, or has only positive lattice points that are \((a,b)\) and \((b,a)\) for one \(a\) and \(b\).