Let $x$ and $y$ be integers not congruent to $0$ modulo $p$ where $p$ is a prime. Prove that if $p \equiv 3 \pmod{4}$ then $x^2+y^2 \not \equiv 0 \pmod{p}$.
I thought about proving this algebraically and by contradiction. So we say $x^2+y^2 = pz$ and have to show this is impossible.