What values of $a,b\in\mathbb{Z^+}$ satisfy the equation $a^b=b^a+1$ ?

I know one answer is $a=3,b=2$, but I know that just by luck. How do I get to the answer? Are there any more of them? Why?

Suppose I don't know the answer, how would I start?

I started taking logarithms to both sides, then changing $1$ to $b^a/b^a$, then simplifying, but nothing. I always end where I start; I only need a hint to make the train rolling.


Some people are answering erroneously because I define $\mathbb{Z^+}$ as $\{1,2,\dots\}$, and $0\not\in\mathbb{Z^+}$. The correct values by now are $a=3,b=2$ and $a=2,b=1$, but are they the only ones? Why?

  • 2
    $\begingroup$ $100^0 = 0^{100} + 1$ $\endgroup$
    – user66081
    Feb 23, 2017 at 17:49
  • 1
    $\begingroup$ Yes, but the issue is whether $(3,2)$ is the only non-trivial solution. To be more general, for what values of $k \in \Bbb Z$ does the equation $$a^b = b^a+k$$ have solutions with $a,b\in\Bbb{Z}^+$ and $a,b>1$? For $k=1$ the issue is fairly easy, but for general $k$ -- which is part of the OP's "where would I start" -- I think it is quite hard. $\endgroup$ Feb 23, 2017 at 17:55
  • 1
    $\begingroup$ Also, $2^1 = 1^2 + 1$ $\endgroup$ Feb 23, 2017 at 17:55
  • $\begingroup$ Note that if $a$ is prime, reducing both sides mod $a$ gives $0 = b + 1$ mod $a$ by Fermat's little theorem. $\endgroup$
    – J Richey
    Feb 23, 2017 at 18:12
  • 5
    $\begingroup$ Mihăilescu's theorem $\endgroup$
    – i9Fn
    Feb 23, 2017 at 18:14

1 Answer 1


As @i9Fn pointed out in the comments, this is another form of the Catalan's conjecture, which Preda Mihăilescu proved that $a=3,b=2$ is the only solution for this problem. (And $a=2, b=1$ if we allow $a=1\lor b=1$)


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .