There is yet another generalization that will serve better as a lead-in to the next chapters. Think about the following two problems.
What numbers can be written as \(x^2+2y^2\text{?}\) (Think of it as \(x^2+y^2+y^2\text{.}\))
What numbers can be written as \(x^2+3y^2\text{?}\)
These are very natural generalizations to the “two squares” question. How could we approach them? Here’s one type of idea.
Fact14.3.1.
No number
\begin{equation*}
n\equiv 5\text{ or }n\equiv 7\text{ (mod }8)
\end{equation*}
can be written as \(x^2+2y^2\text{.}\)
Proof.
Try all numbers modulo 8 and see what is possible! (See Exercise 14.4.3.)
Already Fermat (unsurprisingly) claimed a partial converse to Fact 14.3.1. He stated that any prime number \(p\) which satisfies \(p\equiv 1\) or \(p\equiv 3\text{ (mod }8)\) could be written as a sum of a square and twice a square.
This time, Euler wasn’t the one who proved it! But you could almost imagine that by factoring