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.

Show that $x^2+2y^2=p$ has a solution in $\mathbb{Z}\;$ if and only if $\;p \equiv 1 \; \text{or} \; 3 \mod 8$.

Can someone help on this. Thnx.

share|improve this question
1  
Relevant: The sum of a square and twice a square –  MJD Jun 8 '13 at 14:17
    
Have you tried showing each direction $\Rightarrow$ and $\Leftarrow$ in turn? Which direction are you stuck on? It would also help to know what you've tried, and what previous knowledge you have. –  Goos Jun 8 '13 at 14:22
    
I proved that if $p=x^2+y^2$ then $(p)=(x+iy)(x-iy)$ in $\mathbb{Z}[i]$ so $p \equiv 1 \mod 4$ –  Vali Jun 8 '13 at 14:37
2  
@Vali You can do this question similarly but you'll need to work in $\mathbb{Z}[\sqrt{-2}]$ –  Cocopuffs Jun 8 '13 at 14:41

1 Answer 1

One direction: if $x^2+2y^2=p$ then $x^2\equiv -2y^2\pmod{p}$. But $\gcd(y,p)=1$ so $(x/y)^2\equiv -2\pmod{p}$. Hence $1=\left(\frac{-2}{p}\right)=\left(\frac{2}{p}\right)\left(\frac{-1}{p}\right)=(-1)^{\frac{(p+1)(p-1)}{8}}(-1)^{\frac{p-1}{2}}$ which implies $p\equiv 1,3\pmod{8}$.

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.