Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need help with the following two generalities:

What is the characterization of primes that are sums of two squares?

And what is the characterization of $n\ge 1$ that are sums of two squares?

I'm hoping I'm over thinking these two generalities, but they seem extremely broad to me.

share|cite|improve this question
Take a look here. – P.. Nov 9 '12 at 14:57
up vote 6 down vote accepted

This is sometimes called Fermat's Christmas theorem. The primes are $2$ and all those of the form $4k+1$. For composites, all prime factors of the form $4k+3$ must occur an even number of times.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.