Context: https://news.ycombinator.com/item?id=35635491<p>Without loss of generality, assume a > b [ Or the otherway for that matter, because a != b ]<p>Rewriting the equation we get (a/b)^b = b^(a-b)<p>Right side is integer raised to integer and thus an integer and left side is fraction raised to integer. So that fraction is not really a fraction.<p>In other words a is a multiple of b<p>=> a = c * b where c is an integer > 1 [ Because a != b ]<p>=> c^b = b^(b * ( c - 1)) [ Substituting a with c*b in the original equation ]<p>=> c = b^(c-1) [ Taking bth root on both sides ]<p>c != 1 [ Because a != b ]<p>c != 3 [ Because b^2 = 3 has no integer solutions ]<p>c != 4 [ Because b^3 = 4 has no integer solutions ]<p>And so on..<p>=> c = 2 is the only possible solution<p>=> Substituting c with 2 we get b = 2 and a = 4<p>Edits: Formatting and Explanation