Prove that a prime $p\equiv 1\pmod 8$ can be written in the form $x^2+2y^2.$
I referred to Show every prime $p\equiv 1,3$ (mod 8) can be written as $p=x^2+2y^2$
But it didn't give the solution I require.
We are supposed to use
break up the numbers $\{1, 2, . . . , p − 1\}$ into sets of the form $\{x, \bar{x}, -x, -\bar{x}, ix, −ix, i\bar{x}, −i\bar{x}\}$, where $i^2 \equiv −1 \pmod p$. Then analyze how many elements these sets have.
Here $\bar{x}$ mean the inverse of $x\pmod p$
So we have $\{1, 2, . . . , p − 1\}.$ I didn't get how to incorporate $i.$
So here's the analysis for $\{x, \bar{x}, -x, -\bar{x}\}.$
- If $x\equiv \bar{x}\pmod p\implies x^2\equiv 1\pmod p\implies x\equiv 1,p-1.$
This gives ${1,p-1}$
- If $x\equiv -{x}\pmod p\implies 2x\equiv 0\pmod p.$ Not possible.
- If $x\equiv -\bar{x}\pmod p\implies x^2\equiv -1\pmod p.$
Which is possible only when $p\equiv 1\pmod 4.$ And this will give only $x,-\bar{x}$ to be different. That is $-x\equiv \bar{x}\pmod p.$
Now these break elements of $\{1, 2, . . . , p − 1\}$ into groups of $4$ or $2$ ( of ${1,p-1}$ and sometimes ${x,-\bar{x}}$)
Now, I did the same thing with $\{ix, −ix, i\bar{x}, −i\bar{x}\}.$
- If $ix\equiv i\bar{x}\pmod p\implies x^2\equiv 1\pmod p\implies x\equiv 1,p-1.$
- If $ix\equiv -{x}i\pmod p\implies 2x\equiv 0\pmod p.$ Not possible.
- If $ix\equiv -\bar{x}i\pmod p\implies x^2\equiv -1\pmod p.$ This will give us only $x,-\bar{x}$ to be different.
Any hints?