Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

I have some problems with my homework.

We have two integers $a$ and $b$ which satisfy the equation $a^b - b^a = 1008$.

Show that $a$ and $b$ have the same remainder when divided by $1008$.

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

I don't think this is so easy. It's not true if $1008$ is replaced by, say, $7 = 2^5 - 5^2$ or $28 = 2^6 - 6^2$ or $2800 = 4^6 - 6^4$. Of course one solution is $a=1009$, $b=1$. I don't think there are any solutions with $a,b\ge 2$, based on the fact that $1008$ is not listed in , but I don't know if there's a proof of that.

share|cite|improve this answer
Is there any other solutions? Where can i find some formal proofs abut numbers in x^y - y^x form ? – John Smith Sep 9 '12 at 21:48

Do you know that $(x_0)^x$ grows faster than $x^{x_0}$ when $x,x_0>e$? Both of these quantities are equal when $x=x_0$. That is, the function $f$ with $f(x,y)=x^y-y^x$ is identically $0$ along $y=x$. But because of this difference in growth rate, when $x,y>e$,

  1. $x^y-y^x$ will be negative for $y<x$ (So no solutions are possible with $y<x$.)
  2. For $y>x$, $x^y-y^x$ will be much larger than $0$. In particular, for $x\geq5$, we can establish with calculus that $x^y-y^x>1008$ when $y$ is supposed to be a whole number greater than $x$.
  3. It would remain to examine $x=4,3,2,1$ separately.

Since this is homework, I am leaving out the calculus details that establish items 1 and 2.

share|cite|improve this answer

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.