Prove: $2^k$ is the sum of two perfect squares If $k$ is a nonnegative integer, prove that $2^k$ can be represented as a sum of two perfect squares in exactly one way. (For example, the unique representation of $10$ is $3^2+1^2$; we do not count $1^2+3^2$ as different.)
I understand that $2^{2n}=0+2^{2n}$ and $2^{2n+1}=2^{2n}+2^{2n}$. But how can we prove that $2^k$ can be represented as two perfect squares in exactly one way?

Use induction. 
Note that if $$x^2+y^2=2^k\ (\text{where } k \geq 2)$$
If $x \equiv 1 \pmod 2$, then from $x^2+y^2 \equiv 0 \pmod 2$ we get $y \equiv 1 \pmod 2$.
However, then $$x^2+y^2 \equiv 1+1 \equiv 2 \pmod 4$$ A contradiction. 
Thus, $x=2x_{1}, y=2y_{2}$. Thus $x_1^2+y_1^2 =2^{k-2}$. 
