# MAT 338 Day 24 2011

## 2951 days ago by kcrisman

Well, I just couldn't help myself, because you guys were so interested in the Gaussian integers.  Here is the basics of the argument for why primes of the form $4n+1$ can be written as a sum of squares, the complex numbers version!

• Let $p\equiv 1\text{ mod }(4)$, as we know.
• We already know that $$r = \left(\frac{p-1}{2}\right)!$$ is a square root of $-1$ modulo $p$.
• But now, instead of doing geometry, let's look at what that means.  It means, by definition of $$r^2\equiv -1\text{ mod }(p)$$ that $$p\mid r^2+1\; .$$
• Since $r^2+1$ is $r^2-i^2$, let's factor: $$r^2+1=(r+i)(r-i)$$
• Clearly $p$ does not divide either of those as something of the form $a+bi$.
• So (crucial!), if we assume the FTA still holds for Gaussian integers (things like $a+bi$), then $p$ factors in $\mathbb{Z}[i]$, and has a prime divisor $a+bi$.
• It's not hard to show that then $a-bi$ also must divide $p$. We'll skip this.
• Then $$(a+bi)(a-bi)\mid p^2\Rightarrow a^2+b^2 \mid p^2$$
• Further, this is a nontrivial divisor, since $a+bi$ was a proper divisor of $p$.  So the only possibility is $$a^2+b^2=p\; .$$

Naturally, I am skipping whether we actually have unique factorization in $\mathbb{Z}[i]$.  (It turns out you can prove this most easily using geometry as well!)

But this has some interesting implications that will serve us well going into our next topics.   Think about the following two problems.

• What numbers can be written as $x^2+2y^2$?
• What numbers can be written as $x^2+3y^2$?

These are very natural generalizations.  How could we approach them?

Fact: No number $$n\equiv 5\text{ or }n\equiv 7\text{ mod }(8)$$ can be written as $x^2+2y^2$.

Proof: Try all numbers modulo 8 and see what is possible!

So unsurprisingly, already Fermat claimed a partial converse - that any prime $p$ which is $p\equiv 1$ or $p\equiv 3\text{ mod }(8)$ could be written as a sum of a square and twice a square.

It turns out that Euler wasn't the one who proved that!  But you could almost imagine that by factoring $$x^2+2y^2=(x-\sqrt{2}iy)(x+\sqrt{2}iy)$$ you could start proving such things... and we will return to that idea again in passing.

L=[a^2+2*b^2 for a in [0..10] for b in [0..10]] L.sort(); L
 [0, 1, 2, 3, 4, 6, 8, 9, 9, 11, 12, 16, 17, 18, 18, 19, 22, 24, 25, 27, 27, 32, 33, 33, 34, 36, 36, 38, 41, 43, 44, 48, 49, 50, 51, 51, 54, 54, 57, 57, 59, 64, 66, 66, 67, 68, 72, 72, 73, 75, 76, 81, 81, 81, 82, 83, 86, 88, 89, 96, 97, 98, 99, 99, 99, 100, 102, 102, 107, 108, 108, 113, 114, 114, 118, 121, 123, 128, 129, 131, 132, 132, 134, 136, 137, 144, 147, 150, 153, 153, 162, 162, 163, 164, 166, 171, 172, 177, 178, 179, 187, 192, 198, 198, 200, 201, 204, 209, 209, 211, 216, 225, 226, 228, 236, 243, 249, 262, 264, 281, 300] [0, 1, 2, 3, 4, 6, 8, 9, 9, 11, 12, 16, 17, 18, 18, 19, 22, 24, 25, 27, 27, 32, 33, 33, 34, 36, 36, 38, 41, 43, 44, 48, 49, 50, 51, 51, 54, 54, 57, 57, 59, 64, 66, 66, 67, 68, 72, 72, 73, 75, 76, 81, 81, 81, 82, 83, 86, 88, 89, 96, 97, 98, 99, 99, 99, 100, 102, 102, 107, 108, 108, 113, 114, 114, 118, 121, 123, 128, 129, 131, 132, 132, 134, 136, 137, 144, 147, 150, 153, 153, 162, 162, 163, 164, 166, 171, 172, 177, 178, 179, 187, 192, 198, 198, 200, 201, 204, 209, 209, 211, 216, 225, 226, 228, 236, 243, 249, 262, 264, 281, 300]

But before we do, we will go more in depth with looking at what points are even possible on such a curve.  Remember, if $x^2+y^2=n$ was a circle of radius $\sqrt{n}$, then $x^2+2y^2=n$ must be an ellipse!  So we will spend a few days looking at the notion of (integer) lattice points on a curve.

It is a question at the heart of modern number theory, so we should at least spend a little more time on it - plus, it has such nice pictures!  It turns out it will have a surprising connection to calculus and group theory too.