# An equation in natural numbers

Given $a,b,n\in \mathbb{N}$. What is the easiest route to find a pair of integers $x,y$ such that $(a^2+b^2)^n = x^2 + y^2$?

-

Compute $(a+bi)^n$ and take the real and imaginary parts.

Why it works: The squared norm $\|a+bi\|^2 = a^2+b^2$ is completely multiplicative, so $$\|(a+bi)\|^{2n} = (a^2+b^2)^n = \|(a+bi)^n\|^2.$$

-
you are missing a power of 2 on the norm. – Maesumi Jan 14 '13 at 23:47
Right, I want the squared norm. – user7530 Jan 14 '13 at 23:51
I like this one :) – Drake Jan 15 '13 at 0:04

The easiest is to observe that if $n=2m$ is even, we can use $x=(a^2+b^2)^m$, $y=0$. If $n=2m+1$ is odd, we can use $x=a(a^2+b^2)^m$, $y=b(a^2+b^2)^m$.

-
Ha, that is easiest. – user7530 Jan 14 '13 at 23:45