$x^2+y^2=z^n$: Find solutions without Pythagoras!

Solution 1:

The solution $(x,y,z)=(0,1,1)$ works for all $n$.


If you don't want to allow $0$, then let $x,y\in\Bbb{N}$ be such that $$x+yi=(1+2i)^n.$$ Then $$5^n=((1+2i)(1-2i))^n=(1+2i)^n(1-2i)^n=(x+yi)(x-yi)=x^2+y^2.$$


Alternatively, if $n$ is odd let $m:=\frac{n-1}{2}$ so that $$(2^m)^2+(2^m)^2=2^n.$$


Finally, less constructively, a theorem of Gauss tells us that if an integer is not divisible by any prime congruent to $3$ modulo $4$, then it is a sum of two squares. Hence solutions exist for any $n$.

Solution 2:

I interpret your question as follows: for any positive integer $n$, there exists a positive integer $z$ such that $z^n$ is a sum of two squares (of integers). But Gauss' theorem on sums of two squares - based on the decomposition of primes in the Gaussian integers - states that a positive integer $z$ is a sum of two squares iff for any prime $p\equiv 3 \bmod 4$, the exponent $v_p(z)$ such that $p^{v_p(z)}$ divides exactly $z$ (this could be $0$) is even . Since $v_p(z^n)=nv_p(z)$, we conclude that : - if $n$ is even, any $z$ will do -if $n$ is odd, $z$ will do iff $z$ itself is a sum of two squares .