While preparing for the Putnam math competition my teacher listed the following problem: Solving $a^b = b^a$ for $a,b \in \Bbb N$ where $a,b$ are distinct. I suspect the answer is that there is only one solution: $a=2$ and $b=4$. Now I start with the obvious that $b*ln(a) = a*ln(b)$ and clearly since a,b are distinct then either $a<b$ or $a>b$. Now suppose $b>a$ then $\frac{a}{b} = \frac{lna}{lnb}$ . Now here is where I am stuck. Any hints or ideas are much appreciated.
Edit: Upon more thought it seems that a and b most both be even or odd since otherwise $a^b$ would be odd while $b^a$ would be even and vice versa.