Theorem about prime numbers which are one more than a multiple of $8$ Assume the following:
A prime $p>2$ can be written as $p=m^2+n^2$  for integral $m,n$ iff $p$ is $1$ more than a multiple of $4$. 
Now, prove that every prime which is one more than a multiple of $8$ be written as $x^2+16y^2$ where $x$ and $y$ are integers.
I was able to show that if $p$ is one more than a multiple of $8$, it is one more than a multiple of $4$, and since $p$ is odd, one of $m$ or $n$ is odd. But I am unable to go beyond this point. Could someone please help? 

Let $p\equiv 1\pmod{\! 8}$. Since $p\equiv 1\pmod{\! 4}$, exist $x,y\in\Bbb Z$ giving you $p=x^2+y^2$.   
Exactly one of $x,y$ is even, wlog $y$ is even.   
$x^2\equiv 1\pmod{\! 8}$, $y^2\equiv \{0,4\}\pmod{\! 8}$ and $p\equiv 1\pmod{\! 8}$.  
So we must have $y^2\equiv 0\pmod{\! 8}$.   
$8\mid y^2\iff 4\mid y$. Let $y=4m$. Then $p=x^2+16m^2$.
