Fermat 's theorem on sums of two squares - wikipedia 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 : p = x 2 + y 2, ( displaystyle p = x ^ ( 2 ) + y ^ ( 2 ), ) with x and y integers, if and only if p ≡ 1 ( mod 4 ). ( displaystyle p equiv 1 ( pmod ( 4 ) ). ) The prime numbers for which this is true are called Pythagorean primes. For example, the primes 5, 13, 17, 29, 37 and 41 are all congruent to 1 modulo 4, and they can be expressed as sums of two squares in the following ways : 5 = 1 2 + 2 2, 13 = 2 2 + 3 2, 17 = 1 2 + 4 2, 29 = 2 2 + 5 2, 37 = 1 2 + 6 2, 41 = 4 2 + 5 2. ( 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 ). ) On the other hand, the primes 3, 7, 11, 19, 23 and 31 are all congruent to 3 modulo 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 or 1 modulo 4. Albert Girard was the first to make the observation, describing all positive integral numbers ( not necessarily primes ) expressible as the sum of two squares of positive integers ; this was published in 1625. The statement that every prime p of the form 4n + 1 is the sum of two squares is sometimes called Girard 's theorem. 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. 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 modulo 4 occur to an even exponent, then n is expressible as a sum of two squares. The converse also holds. This equivalence provides the characterization Girard guessed. Contents 1 Proofs of Fermat 's theorem on sums of two squares 2 Related results 3 See also 4 Notes 5 References Proofs of Fermat 's theorem on sums of two squares Main article : Proofs of Fermat 's theorem on sums of two squares Fermat usually did not write down proofs of his claims, and he did not provide a proof of this statement. The first proof was found by Euler after much effort and is based on infinite descent. He announced it in two letters to Goldbach, on May 6, 1747 and on April 12, 1749 ; he published the detailed proof in two articles ( between 1752 and 1755 ). Lagrange gave a proof in 1775 that was based on his study of quadratic forms. This proof was simplified by Gauss in his Disquisitiones Arithmeticae ( art. 182 ). Dedekind gave at least two proofs based on the arithmetic of the Gaussian integers. There is an elegant proof using Minkowski 's theorem about convex sets. Simplifying an earlier short proof due to Heath - Brown ( who was inspired by Liouville 's idea ), Zagier presented a one - sentence proof of Fermat 's assertion. And more recently Christopher gave a partition - theoretic proof. Related results Fermat announced two related results fourteen years later. In a letter to Blaise Pascal dated September 25, 1654 he announced the following two results for odd primes p ( displaystyle p ) : p = x 2 + 2 y 2 ⇔ p ≡ 1 or p ≡ 3 ( mod 8 ), ( displaystyle p = x ^ ( 2 ) + 2y ^ ( 2 ) Leftrightarrow p equiv 1 ( mbox ( or ) ) p equiv 3 ( pmod ( 8 ) ), ) p = x 2 + 3 y 2 ⇔ p ≡ 1 ( mod 3 ). ( displaystyle p = x ^ ( 2 ) + 3y ^ ( 2 ) Leftrightarrow p equiv 1 ( pmod ( 3 ) ). ) He also wrote : If two primes which end in 3 or 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. In other words, if p, q are of the form 20k + 3 or 20k + 7, then pq = x + 5y. Euler later extended this to the conjecture that p = x 2 + 5 y 2 ⇔ p ≡ 1 or p ≡ 9 ( mod 20 ), ( displaystyle p = x ^ ( 2 ) + 5y ^ ( 2 ) Leftrightarrow p equiv 1 ( mbox ( or ) ) p equiv 9 ( pmod ( 20 ) ), ) 2 p = x 2 + 5 y 2 ⇔ p ≡ 3 or p ≡ 7 ( mod 20 ). ( displaystyle 2p = x ^ ( 2 ) + 5y ^ ( 2 ) Leftrightarrow p equiv 3 ( mbox ( or ) ) p equiv 7 ( pmod ( 20 ) ). ) Both Fermat 's assertion and Euler 's conjecture were established by Lagrange. A generalization of Fermat 's theorem, the sum of two squares theorem, characterizes the integers ( not necessarily prime ) that can be expressed as the sum of two squares. They are exactly the integers in which each prime that is congruent to 3 mod 4 appears with an even exponent in the prime factorization of the number. See also Proofs of Fermat 's theorem on sums of two squares Legendre 's three - square theorem Lagrange 's four - square theorem Landau -- Ramanujan constant Thue 's lemma Notes Jump up ^ Simon Stevin. l'Arithmétique de Simon Stevin de Bruges, annotated by Albert Girard, Leyde 1625, p. 622. Jump up ^ L.E. Dickson, History of the Theory of Numbers, Vol. II, Ch. VI, p. 227. Jump up ^ L.E. Dickson, History of the Theory of Numbers, Vol. II, Ch. VI, p. 228. Jump up ^ For a proof of the converse see for instance 20.1, Theorems 367 and 368, in : G.H. Hardy and E.M. Wright. An introduction to the theory of numbers, Oxford 1938. Jump up ^ De numerus qui sunt aggregata quorum quadratorum. ( Novi commentarii academiae scientiarum Petropolitanae 4 ( 1752 / 3 ), 1758, 3 - 40 ) Jump up ^ Demonstratio theorematis FERMATIANI omnem numerum primum formae 4n + 1 esse summam duorum quadratorum. ( Novi commentarii academiae scientiarum Petropolitanae 5 ( 1754 / 5 ), 1760, 3 - 13 ) Jump up ^ Zagier, D. ( 1990 ), `` A one - sentence proof that every prime p ≡ 1 ( mod 4 ) is a sum of two squares '', American Mathematical Monthly, 97 ( 2 ) : 144, doi : 10.2307 / 2323918, MR 1041893. Jump up ^ A. David Christopher. A partition - theoretic proof of Fermat 's Two Squares Theorem, Discrete Mathematics 339 ( 2016 ), 1410 -- 1411. References L.E. Dickson. History of the Theory of Numbers Vol. 2. Chelsea Publishing Co., New York 1920 Stillwell, John. Introduction to Theory of Algebraic Integers by Richard Dedekind. Cambridge University Library, Cambridge University Press 1996. ISBN 0 - 521 - 56518 - 9 D.A. Cox ( 1989 ). Primes of the Form x + ny. Wiley - Interscience. ISBN 0 - 471 - 50654 - 0. Retrieved from `` https://en.wikipedia.org/w/index.php?title=Fermat%27s_theorem_on_sums_of_two_squares&oldid=835669930 '' Categories : Additive number theory Theorems in number theory Talk Contents About Wikipedia Беларуская Català Deutsch Español Français Galego 한국어 Italiano עברית Magyar Nederlands 日本 語 Polski Русский தமிழ் Українська Tiếng Việt 中文 10 more Edit links This page was last edited on 10 April 2018, at 02 : 04 ( UTC ). Text is available under the Creative Commons Attribution - ShareAlike License ; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia ® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization. About Wikipedia

Question: numbers that are the sum of two squares
Answer: 5