The number $16$ is expressible as $2^4=4^2$ and I've checked other integers, but I couldn't find the others with that property. I wonder if number $16$ is the only integer with that property if $A$ and $B$ are restricted to be integers. Is there an integer with that property if $A$ and $B$ are allowed to be any numbers?

  • 2
    $\begingroup$ Of course there arte the trivial cases with $A=B$ ... $\endgroup$ Jan 14, 2015 at 12:32
  • $\begingroup$ yes, i mean the non trivial solutions $\endgroup$
    – Gary B
    Jan 14, 2015 at 12:39

1 Answer 1


The equation $A^B = B^A$ rewrites to $\sqrt[A]{A} = \sqrt[B]{B}$. The function $x \mapsto \sqrt[x]{x} = x^{\frac 1x} = e^{\log(x)/x}$ has derivative $e^{\log(x)/x}(1-\log(x))x^{-2}$ which is positive for $x<e$ and negative for $x>e$. This means that the function $x \mapsto \sqrt[x]{x}$ is increasing for $x<e$ and decreasing for $x>e$:

enter image description here

If two different positive integers $A,B$ satisfy $A^B = B^A$, we therefore should have $\min(A,B) < e$ hence $\min(A,B) \in \{1,2\}$. This quickly gives the desired result $$ \{(A,B) \in \mathbb{N}^2: A^B = B^A, A \neq B\} = \{(2,4), (4,2)\}. $$


This site is temporarily in read-only mode and not accepting new answers.

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