Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Prove:

If $p$ is a prime where $p \equiv 3 \pmod{4}$ then $p$ can't be written as the sum of two numbers squared.

I attempted by contradiction, supposing that $p=a^2 + b^2$ where $a,b$ are integers. From definitions i got down to $4$ must divide $a^2 + b^2 - 3$ (since $p=a^2 + b^2\equiv 3 \pmod{4} )$ but I am unsure why this is (or leads to) a contradiction.

share|improve this question

1 Answer 1

We have that $p\equiv 3 \mod 4$, thus $p=4k+3$. Now, modulo $4$ we have that the squares are $$0^2=0\\1^2=1\\2^2=0\\3^2=1$$

But then $$a^2+b^2=0,1,2\mod 4$$

That is, any sum of squares cannot be $\equiv 3\mod 4$. Note that $p$ being prime is irrelevant!

share|improve this answer

Your Answer

 
discard

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.