TITLE: If $m^n = n^m$, why does $m$ to be a factor of $n$?
QUESTION [7 upvotes]: Let $m^n = n^m$ with $n,m \in \mathbb{N}$ and $n > m.$
Why does $m$ have to be a factor of $n$?
I think it's because of the prime factorization, but I can't prove it.

REPLY [8 votes]: Let $v_p(x)$ be the exponent of a prime $p$ in the factorization of $x$.
Then $m^n = n^m$ implies $n v_p(m) = m v_p(n) $ for all $p$.
Since $n >m$, we get $m v_p(n) = n v_p(m) \ge m v_p(m)$ and so $v_p(n) \ge v_p(m)$ for all $p$.
This means that $m$ divides $n$.
Alternatively, write $n=m+t$ with $t>0$. Then $m^n = n^m$ implies $n^t=q^m$, for $q=n/m$. Thus, $q$ is a rational root of the monic polynomial equation $x^m-n^t=0$. By the rational root theorem, $q$ must be an integer and so $m$ divides $n$.