One of the most important theorems in elementary number theory is Fermat's
result stating that a prime of the form 4k+1 can be represented as a
sum of
two squares. The proof given in Chapter 14 is via the method of descent. We
wish to extend this result to representation of primes by numbers of the form
,
, ...,
and more generally, by a binary
quadratic form
.
The method of descent is insufficient to deal with these problems.
We develop the theory of equivalence of binary quadratic forms, the reduction theory for forms of positive discriminant, and the elementary theory of classes and genera. These are applied to solve problems of representation of primes by binary quadratic forms in a large number of cases. An example of the type of result that is obtained is the following.
A prime p is the of the formif and only if p=2k+1 or p=2k+9.
A prime p is of the form
if and only if p=20k+3 or p=20k+7.
In addition, we also study the number of representations of a prime by binary
quadratic forms. This has applications to the solution of Diophantine
problems, such as Fermat's result stating that has only
and x=3 as a solution.