Proof that no integers satisfy $x^2+2y^2 = p$

175 Views Asked by At

Suppose $p$ is a prime such that $p\equiv 5,7 \ \pmod{8}$, then I want to show that there exist no integral solutions $(x,y)$ such that $x^2+2y^2=p$.

I did a simple approach of simply computing with $x,y=0,1,....7$. But I want to know a more technical approach with a good explanation. Hope someone can help me.

1

There are 1 best solutions below

2
On BEST ANSWER

Hint: Since $p$ is odd, $x$ is odd, which directly gives $x^2 \equiv 1 \pmod 8$. Then what can you say about $$2y^2 = p - x^2?$$