Elementary proof of $m^n\neq n^m$ for almost all natural numbers $m\neq n$

Solution 1:

The relation $m^n=n^m$ implies that $n,m$ have the same prime factors $p_1<p_2<...<p_k$. Suppose $m=\prod p_i^{\alpha_i},\ n=\prod p_i^{\beta_i}$. By the unique factorization theorem and the relation $m^n=n^m$ we get that $\alpha_i n=\beta_i m$. Suppose $m>n$. This implies $\alpha_i>\beta_i$ since $\alpha_i/\beta_i=m/n$. Therefore $n|m$.

Denote $m=dn$ and $(dn)^n=n^{(dn)}$ i.e. $dn=n^d$ or $d=n^{d-1}$. For $n \geq 2$ we have $n^{d-1}\geq d$ with equality for $d=1$ (which is not good since $m>n$) or $d=2,n=2$ and therefore $m=4$.

Solution 2:

HINT $\ $ wlog $\rm\displaystyle\ m > n\ \Rightarrow\ \bigg(\frac{m}n\bigg)^n =\: n^{m-n}\in \mathbb Z\ \Rightarrow\ k := \frac{m}n \in\mathbb Z\ \Rightarrow\ k = n^{k-1}\ \Rightarrow\:\cdots$

NOTE $\ $ Above I have implicitly invoked the Rational Root Test to infer that for $\rm\:j\in \mathbb Z,\: n\in \mathbb N\:,\:$ rational roots of $\rm\ x^n -j\ $ must be integers. $\:$ Above is the special case $\rm\ x = m/n,\ j = n^{m-n}\:.$