I saw this in quora.
What are all the integer solutions to $a^{b^2} = b^a$ with $a, b \ge 2$?
Solutions I have found so far:
$a = 2^4 = 16, b = 2, a^{b^2} = 2^{4\cdot 4} =2^{16}, b^a = 2^{16} $.
$a = 3^3, b = 3, a^{b^2} = 3^{3\cdot 9} =3^{27}, b^a = 3^{3^3} =3^{27} $.
In the general case, $a$ and $b$ have the same set of prime divisors, so let $a =\prod_P p_i^{a_i}$, $b =\prod_P p_i^{b_i} $ with each $a_i \ge 1, b_i \ge 1$.
$b^a =b^{\prod p_i^{a_i}} =(\prod p_j^{b_j})^{\prod p_i^{a_i}} =\prod p_j^{b_j\prod p_i^{a_i}} $
$a^{b^2} =a^{\prod p_i^{2b_i}} =(\prod p_j^{a_j})^{\prod p_i^{2b_i}} =\prod p_j^{a_j\prod p_i^{2b_i}} $
Therefore, for each $p_j$, $b_j\prod p_i^{a_i} =a_j\prod p_i^{2b_i} $.
I haven't gotten any further than this.
I conjecture that there are no other solutions.
IMO 1997, Problem B2
Find all pairs $(a, b)$ of positive integers that satisfy $a^{b^2} = b^a$.
Answer
$(1,1)$, $(16,2)$, $(27,3)$.
Solution
Notice first that if we have $a^m = b^n$, then we must have $a = c^e$, $b = c^f$, for some $c$, where $m=fd$, $n=ed$ and $d$ is the greatest common divisor of $m$ and $n$.
[Proof: express $a$ and $b$ as products of primes in the usual way.]
In this case let $d$ be the greatest common divisor of $a$ and $b^2$, and put $a = de$, $b^2 = df$. Then for some $c$, $a = ce$, $b = cf$. Hence $f c^e = e c^{2f}$. We cannot have $e = 2f$, for then the $c$'s cancel to give $e = f$. Contradiction.
Suppose $2f > e$, then $f = e c^{2f-e}$. Hence $e = 1$ and $f = c^{2f-1}$. If $c = 1$, then $f = 1$ and we have the solution $a = b = 1$. If $c ≥ 2$, then $c^{2f-1} ≥ 2^f > f$, so there are no solutions.
Finally, suppose $2f < e$. Then $e = f c^{e-2f}$. Hence $f = 1$ and $e = c^{e-2}$. $c^{e-2} ≥ 2^{e-2} ≥ e$ for $e ≥ 5$, so we must have $e = 3$ or $4$ ($e > 2f = 2$). $e = 3$ gives the solution $a = 27$, $b = 3$. $e = 4$ gives the solution $a = 16$, $b = 2$.
P.S. Since the website I referred to in the comment above has been moved in the past, I don't know how permanent this link will be. So I quoted the solution here.