theorem on sums of two squares by Fermat
Suppose that an odd prime number can be written as the sum
where and are integers. Then they have to be coprime![]()
. We will show that is of the form .
Since , the congruence![]()
has a solution , whence
and thus
Consequently, the Legendre symbol![]()
is , i.e.
Therefore, we must have
| (1) |
where is a positive integer.
Euler has first proved the following theorem presented byFermat and containing also the converse![]()
of the above claim.
Theorem(Thue’s lemma (http://planetmath.org/ThuesLemma)). An odd prime isuniquely expressible as sum of two squares of integers if andonly if it satisfies (1) with an integer value of .
The theorem implies easily the
Corollary. If all odd prime factors of a positiveinteger are congruent to 1 modulo 4 then the integer is a sumof two squares. (Cf. the proof of the parent article and the article“prime factors![]()
of Pythagorean hypotenuses (http://planetmath.org/primefactorsofpythagoreanhypotenuses)”.)