$p$ is an odd prime of the form $p=x^2+2y^2$ iff $p\equiv_8$ $1$ or $3$

155 Views Asked by At

How would I prove the following:

Show that an odd prime $p$ can be written on the form $p=x^2+2y^2$ for some $x,y\in\mathbb Z$ iff $p\equiv_8 1, 3$. Hint: use the quadratic reciprocity and the fact that $\mathbb Z[\sqrt{-2}]$ is a Euclidean domain.

1

There are 1 best solutions below

0
On

Hints:

  • The forward direction is elementary. Subsequently check, which values can be assumed by squares and $x^2+2y^2$ modulo $8$.
  • For the other direction, check that $-2$ is a quadratic residue modulo $p$. That is, there is an $a\in\mathbb Z$, such that $p\mid a^2+2$. Try continuing from here by switching to $\mathbb Z[\sqrt{-2}]$ which is Euclidean, hence a UFD.