TITLE: Is there only one pair of unequal rational numbers with $n^m = m^n$?
QUESTION [10 upvotes]: While talking with a friend about the number $16$, I began thinking about what two positive rational numbers, $n$ and $m$, satisfy the condition that $n^m$ = $m^n$ where $n$ and $m$ are not equal. $2$ and $4$, as discussed with my friend, are the first pair of integers to do this, and seem to be the only pair to do this after brute forcing combinations in a python script. It seems like there should be more possible pairs, so are $2$ and $4$ the only positive rational numbers to satisfy these conditions?

REPLY [18 votes]: Consider taking the $mn$-th root $$n^m=m^n\\n^{1/n}=m^{1/m}$$
Now the function $f(x)=x^{1/x}$ attains it's maximum at $x=e$ and is increasing from $(0,e)$ and decreasing from $(e,\infty)$ WLOG assume $m>n$ then $m\in (e,\infty)$ while $n\in (0,e)$.
If we limit $m,n$ to be integers we can see that either $m=1$ or $m=2$ which both give the trivial solutions $m=n=1$ and $m=2,n=4$.
In general if we are looking for rational solutions we get the parametric equation by setting $n=km$ $$m^{km}=(km)^m\\m^{(k-1)m}=k^m\\m=k^{1/(k-1)}$$
From this putting $t=\frac{1}{k-1}$ we get $m=(1+\frac1t)^t$ and $n=(1+\frac{1}{t})^{t+1}$,this parametrization gives infinitely many rational solutions (for any integer $t\neq -1,0$) for example for $t=2$ we get $2.25^{3.375}=3.375^{2.25}$