Problem

Source: I International Festival of Young Mathematicians Sozopol 2010, Theme for 10-12 grade

Tags: number theory



Let $A=\{ x\in \mathbb{N},x=a^2+2b^2,a,b\in \mathbb{Z},ab\neq 0 \}$ and $p$ is a prime number. Prove that if $p^2\in A$, then $p\in A$.