# Fermat's theorem on sums of two squares

Fermat's theorem on sums of two squares For other theorems named after Pierre de Fermat, see Fermat's theorem.

In additive number theory, Fermat's theorem on sums of two squares states that an odd prime p can be expressed as: {displaystyle p=x^{2}+^{2},} with x and y integers, se e apenas se {displaystyle pequiv 1{pmod {4}}.} The prime numbers for which this is true are called Pythagorean primes. Por exemplo, the primes 5, 13, 17, 29, 37 e 41 are all congruent to 1 módulo 4, and they can be expressed as sums of two squares in the following ways: {displaystyle 5=1^{2}+2^{2},quad 13=2^{2}+3^{2},quad 17=1^{2}+4^{2},quad 29=2^{2}+5^{2},quad 37=1^{2}+6^{2},quad 41=4^{2}+5^{2}.} Por outro lado, the primes 3, 7, 11, 19, 23 e 31 are all congruent to 3 módulo 4, and none of them can be expressed as the sum of two squares. This is the easier part of the theorem, and follows immediately from the observation that all squares are congruent to 0 ou 1 módulo 4.

Since the Diophantus identity implies that the product of two integers each of which can be written as the sum of two squares is itself expressible as the sum of two squares, by applying Fermat's theorem to the prime factorization of any positive integer n, we see that if all the prime factors of n congruent to 3 módulo 4 occur to an even exponent, then n is expressible as a sum of two squares. The converse also holds.[1] This generalization of Fermat's theorem is known as the sum of two squares theorem.

Conteúdo 1 História 2 Gaussian primes 3 Resultados relacionados 4 Algorithm 4.1 Description 4.2 Exemplo 5 Provas 5.1 Euler's proof by infinite descent 5.2 Lagrange's proof through quadratic forms 5.3 Dedekind's two proofs using Gaussian integers 5.4 Proof by Minkowski's Theorem 5.5 Zagier's "one-sentence proof" 5.6 Proof with partition theory 6 Veja também 7 Referências 8 Notas 9 External links History Albert Girard was the first to make the observation, describing all positive integer numbers (not necessarily primes) expressible as the sum of two squares of positive integers; this was published in 1625.[2][3] The statement that every prime p of the form 4n+1 is the sum of two squares is sometimes called Girard's theorem.[4] For his part, Fermat wrote an elaborate version of the statement (in which he also gave the number of possible expressions of the powers of p as a sum of two squares) in a letter to Marin Mersenne dated December 25, 1640: for this reason this version of the theorem is sometimes called Fermat's Christmas theorem.

Gaussian primes Fermat's theorem on sums of two squares is strongly related with the theory of Gaussian primes.

A Gaussian integer is a complex number {displaystyle a+ib} such that a and b are integers. The norm {estilo de exibição N(a+ib)=a^{2}+b^{2}} of a Gaussian integer is an integer equal to the square of the absolute value of the Gaussian integer. The norm of a product of Gaussian integers is the product of their norms. This is the Diophantus identity, which results immediately from the similar property of the absolute value.

Gaussian integers form a principal ideal domain. This implies that Gaussian primes can be defined similarly as primes numbers, that is as those Gaussian integers that are not the product of two non-units (here the units are 1, −1, i and −i).

In a letter to Blaise Pascal dated September 25, 1654 Fermat announced the following two results that are essentially the special cases {displaystyle d=-2} e {displaystyle d=-3.} If p is an odd prime, então {displaystyle p=x^{2}+2^{2}iff pequiv 1{mbox{ ou }}pequiv 3{pmod {8}},} {displaystyle p=x^{2}+3^{2}iff pequiv 1{pmod {3}}.} Fermat wrote also: If two primes which end in 3 ou 7 and surpass by 3 a multiple of 4 are multiplied, then their product will be composed of a square and the quintuple of another square.