# 1998 JBMO Problems/Problem 3

Find all pairs of positive integers $(x,y)$ such that $\[x^y = y^{x - y}.\]$

## Solution

Note that $x^y$ is at least one. Then $y^{x - y}$ is at least one, so $x \geq y$.

Write $x = a^{b+c}, y = a^c$, where $\gcd(b, c) = 1$. (We know that $b$ is nonnegative because $x\geq y$.) Then our equation becomes $a^{(b+c)*a^c} = a^{c*(a^{b+c} - a^c)}$. Taking logarithms base $a$ and dividing through by $a^c$, we obtain $b + c = c*(a^b - 1)$.

Since $c$ divides the RHS of this equation, it must divide the LHS. Since $\gcd(b, c) = 1$ by assumption, we must have $c = 1$, so that the equation reduces to $b + 1 = a^b - 1$, or $b + 2 = a^b$. This equation has only the solutions $b = 1, a = 3$ and $b = 2, a = 2$.

Therefore, our only solutions are $x = 3^{1 + 1} = 9, y = 3^1 = 3$, and $x = 2^{2+1} = 8, y = 2^1 = 2$, and we are done.