<s>[INST] What are the integer solutions to $a^{b^2} = b^a$ with $a, b \ge 2$ 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.
 [/INST] Render $a=tb^2$.  Then
$(tb^2)^{b^2}=b^{tb^2}$
$tb^2=b^t$ ($b$ is assumed nonzero)
$t=b^{t-2}$ ($t$ is nonzero bdcause $a$ is assumed nonzero)
If $b$ is to be a positive integer and $t$ is rational, then $t$ will be a positive integer or $b$ will be a perfect power.  But if $t>4$ then $b=t^{1/(t-2)}$ will lie strictly between $1$ and $2$, and $b\ge 4$ requires $t\ge 4^{t-2}$ which also excludes $t>4$.  We are forced to a finite set of candidates for $t$, namely $\{1,2,3,4\}$, from which there can be only finitely many solutions for $b$ and thus for $a=tb^2$.
</s>