I am working through Kevin Houston's book How to think like a mathematician. The question I am currently stuck on is to show that
$$x^2 + y^2 = z^n$$
has positive integer solutions for $n = 1,2,3,\dots$
My work thus far:
$f: \mathbb{N}^2 \rightarrow \mathbb{N}$ defined by $f(x,y) = x^2 + y^2$ with image $A = \{2,5,8,10,13,17,\dots\}$
$g: \mathbb{N} \rightarrow \mathbb{N}$ defined by $g(z) = z^n$ with image $B = \{1,2^n,3^n,\dots\}$
If I can show that $A \cap B \neq \varnothing$ for $n \in \mathbb{N}$ then this shows that there are integer solutions for all $n$. How can this be shown?