Let $n \in \mathbb{N}$ and $p$ an odd prime number such as $p \nmid n$. Prove that:

$\exists x, y \in \mathbb{Z};\,\, \gcd(x, y) = 1$ such as $x^{2} + ny^{2} \equiv 0\, (\mod p) \iff \Bigg(\displaystyle \frac{-n}{p}\Bigg) = 1$, where $\Bigg(\displaystyle \frac{-n}{p}\Bigg)$ represent the Legendre Symbol.

I've been trying but I have not idea where to start. Thanks in advance.


Here is an outline, see if you can fill in more details.

First part: if $x^2+ny^2\equiv0\pmod p$ then $y$ is not a multiple of $p$. (If so then $x$ is a multiple of $p$, but this is impossible since $\gcd(x,y)=1$.) So $y$ has a multiplicative inverse $z$ modulo $p$, so $-n\equiv(xz)^2\pmod p$.

Converse: if $\bigl(\frac{-n}p\bigr)=1$ then for some $x$ we have $-n\equiv x^2\pmod p$, that is, $x^2+n\equiv0\pmod p$, and now you should have no trouble finding a suitable value of $y$.

  • $\begingroup$ ive been trying but i still can get a value of y. $\endgroup$ – Jearson Narvaez Rojas Oct 31 '14 at 7:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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