It is a theorem in elementary number theory that if $p$ is a prime and congruent to 1 mod 4, then it is the sum of two squares. Apparently there is a trick involving arithmetic in the gaussian integers that lets you prove this quickly. Can anyone explain it?
How do you prove that a prime is the sum of two squares iff it is congruent to 1 mod 4?
38
$\begingroup$
number-theory
prime-numbers
-
1Yes we figured that – 2010-07-23
-
7As long as you are open to accepting someone else's answer if it is better than your own :) – 2010-07-23
-
0For another interesting method of proof, see http://demonstrations.wolfram.com/Fermats4n1TheoremAndTheNQueensProblem/ and the Larson article it refers to. (L. C. Larson, "A Theorem about Primes Proved on a Chessboard," Mathematics Magazine, 50(2), 1977 pp. 69–74.) – 2010-08-09