Let $n=x^2+y^2$; $n=2^{2k}m$ or $n=2^{2k+1}m$ with $m$ odd. Prove that $2^{k}$ divides both $x$ and $y$. Let $n=x^2+y^2$ where x,y are integers, be one of the forms $n=2^{2k}m$ respectively $n=2^{2k+1}m$ with m odd. Prove that $2^{k}$ divides both x and y.

Let $(x,y)=2^rs$ where $s$ is odd
and $\displaystyle\frac xX=\frac yY=2^rs\implies (X,Y)=1$
$\displaystyle\implies x^2+y^2=2^{2r}s^2(X^2+Y^2)$
Now as $(X,Y)=1,$  
Case $1:$ Either both are odd :
As $(2c+1)^2=4c^2+4c+1\equiv1\pmod4, X^2+Y^2=2\pmod4$ i.e., divisible by $2,$ but not by $4$
Case $2:$ $X,Y$ are of opposite parity 
$\implies X^2+y^2\equiv0+1\pmod4$ i.e., odd
