Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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$?

share|cite|improve this question
up vote 2 down vote accepted

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.$$

share|cite|improve this answer
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$.

share|cite|improve this answer
Ha, that is easiest. – user7530 Jan 14 '13 at 23:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.