The set $A = \{a^2 + 2b^2\mid a,b \in \Bbb Z\setminus\{0\}\}$

Let $A = \{a^2 + 2b^2\mid a,b \in \Bbb Z\setminus\{0\}\}$ and $p$ be a prime number. Prove that if $p^2 \in\ A$, then $p \in A$.

-
Where on earth did you get $\sqrt{a^2+2b^2}=a-\sqrt{2}bi$ from? – Chris Eagle Oct 17 '12 at 6:08
Anyway, the result is false: $25=5^2+2\cdot0^2$ is in $A$, but $5$ is not. – Chris Eagle Oct 17 '12 at 6:11
ok but what if we don't allow $b$ to be $0$? – fmat Oct 17 '12 at 6:14
Have you seen the proof that if $a^2+b^2=c^2$ with $a,b,c$ relatively prime, $a$ odd, then there are integers $m,n$ such that $a=m^2-n^2$, $b=2mn$, $c=m^2+n^2$? That shows if $p^2$ is a sum of two squares then so is $p$. Perhaps you can find some similar parametrization for $a^2+2b^2=c^2$. – Gerry Myerson Oct 17 '12 at 6:19

The quadratic ring $Z(\sqrt{-2})$ is a unique factorization domain. A rational prime is one of our usual list 2,3,5,... (an integer). By a ring prime I'll mean a prime element of $Z(\sqrt{-2})$. Some rational primes are also ring primes, and others are not but factor in $Z(\sqrt{-2})$. (There is a characterization mod 8 of which primes do which. We don't need that here.)

Recall from fmat's post that

$A = \{a^2 + 2b^2\mid a,b \in \Bbb Z\setminus\{0\}\}$.

If $p^2$ is in $A$ then $p^2=a^2+2b^2=(a+b\sqrt{-2})(a-b\sqrt{-2})$.

If here $p$ were a ring prime this would contradict unique factorization, since the units of $Z(\sqrt{-2})$ are $-1,1$ and we're assuming $a,b$ nonzero.

And if $p$ is not a ring prime it factors as $p=(x+y\sqrt{-2})(x-y\sqrt{-2})$ [A standard result for $Z(\sqrt{-2})$ and similar rings]. But then $p=x^2+2y^2$ on multiplying out, so that we have $p$ in $A$ as desired.

-
Good. But I note the elementary-number-theory tag. I tend to think of anything involving number fields (other than the rationals) as Algebraic Number Theory, and not quite elementary. – Gerry Myerson Oct 18 '12 at 1:43
Gerry: Just looked at this comment. You're right, there should be a more basic approach, good for intro number theory. I'll try for one... – coffeemath Oct 25 '12 at 13:19
Try reading my comment on the original question. – Gerry Myerson Oct 25 '12 at 22:50