Section13.2Primes can be written in at most one way

We will begin our proofs by using the identity from a previous section in a surprising way to talk 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.

That is, we are discussing not a situation like \[13=3^2+2^2=2^2+3^2\] but one more like \[25=5^2+0^2=3^2+4^2\; .\]

Let's show this works.

  • Assume that \[N = a^2+b^2 = c^2+d^2\text{ with }a,c\text{ odd and }b,d\text{ even.}\]
  • Then let \[k=gcd(a-c,d-b)\text{ and }n=gcd(a+c,d+b)\text{ (both are even)}\] and \[\ell=\frac{a-c}{k}=\frac{d+b}{n}\text{ and }m=\frac{a+c}{n}=\frac{d-b}{k}\; .\]
  • Then we get that \[N=\left[\left(\frac{k}{2}\right)^2+\left(\frac{n}{2}\right)^2\right]\left(m^2+\ell^2\right)\]
  • There are some details here, especially in terms of verifying all these numbers exist, but they are mostly just the definition of gcd and parity.

Example13.2.2

So for instance 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 \[25=\left[\left(\frac{2}{2}\right)^2+\left(\frac{4}{2}\right)^2\right]\left(1^2+2^2\right)=5\cdot 5\]

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.

We can see this visually, in that each of 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\).