TITLE: Powers of 13 expressable as sums of squares
QUESTION [5 upvotes]: Show that
$$13^k=a^2+b^2,k\in \mathbb{N}$$
has only one solution $(a,b)$
where $a,b\in \mathbb{N^{+}}，gcd(a,b)=1$.
For example, $$13=2^2+3^2$$
$$13^2=169=5^2+12^2$$
I  think this is very interesting problem. Thank you everyone.

REPLY [3 votes]: Known facts:

$13$ is a prime of the form $4k+1$.
For every prime $p$ of the from $4k+1$, there are integers $1 \le x < y < p$ such that
$p = x^2 + y^2$. In particular, $13 = 2^2 + 3^2 = (2+3i)(2-3i)$.
$\mathbb{Z}[i] = \{\;x + i y : x, y \in \mathbb{Z}\;\}$, the set of Guassian integers is a unique factorization domain with
units $\pm 1, \pm i$ and three type of primes:

$1+i\quad$ ( $1-i$ is equivalent to $1+i$ through a unit ).  
$x+iy, x-iy\quad$ where $x^2 + y^2 = p$ is a prime of the form $4k+1$.
The $x \pm iy$ are inequivalent over $\mathbb{Z}[i]$.  
$p$ a prime of the form $4k+3$.


Since $13 = (2+3i)(2-3i)$, in any representation of $13^k$ as a sum of squares:
$$13^k = a^2 + b^2 = (a+bi)(a-bi)\tag{*1}$$
the unique factorization property of $\mathbb{Z}[i]$ forces $a + ib$ to have the form:
$$a + bi = i^e (2 + 3i)^f (2-3i)^{k-f}\tag{*2}$$
where $0 \le e < 4$ and $0 \le f \le k$.
If $0 < f < k$, then the R.H.S of $(*2)$ contains a factor $(2+3i)(2-3i) = 13$. This will make $\gcd(a,b) > 1$ (or one of $a,b$ vanish). This means if one want a solution of $(*1)$ with $\gcd(a,b) = 1$, $f$ can only be $0$ or $k$.
Notice the $f = 0$ case can be obtained from a $f = k$ case by taking complex conjugation. 
Furthermore, multiplication of $i^e$ either changes the signs of $a,b$ or exchange among them. 
As a result, up to flipping the signs and/or exchaning $a$ with $b$, the unique solution of $(*1)$ with $\gcd(a,b) = 1$ is given by (as pointed by other poster):
$$a + i b = (2+3i)^k$$