Find all non-zero natural numbers $a$ and $b$ such that

$$
a^{b}=b^{a^{2}}
$$
First, we observe that $(a, b)=(1,1)$ is a solution. Conversely, let $(a, b)$ be a potential solution other than $(1,1)$. Since $a$ divides $b^{a^{2}}$ and $b$ divides $a^{b}$, we know that $a$ and $b$ have the same prime factors.

Let $p$ be a prime factor of $a$, and let $v$ and $w$ be the $p$-adic valuations of $a$ and $b$, respectively. Let also $d=\left(a^{2}\right) \wedge b$, then $\alpha=a^{2} / d$ and $\beta=b / d$. Then

$$
\beta d v=b v=v_{p}\left(a^{b}\right)=v_{p}\left(b^{a^{2}}\right)=a^{2} w=\alpha d w .
$$

Since $\alpha \wedge \beta=1$, we conclude that $\alpha$ divides $v$ and that $\beta$ divides $w$. Therefore, there exists an integer $k_{p}$ such that

$$
k_{p}=\frac{v}{\alpha}=\frac{w}{\beta} .
$$

Consequently, by setting

$$
c=\prod_{p} p^{k_{p}}
$$

we observe that $a=c^{\alpha}, b=c^{\beta}$ and $c \geqslant 2$. The equation in the statement then rewrites as $c^{\alpha b}=$ $c^{\beta a^{2}}$, or equivalently as $\alpha c^{\beta}=\alpha b=\beta a^{2}=\beta c^{2 \alpha}$.

Now suppose that $\beta<2 \alpha$. In this case, the equation in the statement rewrites as $\alpha=c^{2 \alpha-\beta} \beta$. Since $\alpha \wedge \beta=1$, this means that $\beta=1$ and that $\alpha \geqslant c \geqslant 2$, so that $2 \alpha-1 \geqslant 3$, hence

$$
\alpha=c^{2 \alpha-1} \geqslant 2^{2 \alpha-1} \geqslant\binom{ 2 \alpha-1}{0}+\binom{2 \alpha-1}{1}+\binom{2 \alpha-1}{2 \alpha-2}+\binom{2 \alpha-1}{2 \alpha-1}=2 \alpha-1
$$

We deduce that $\alpha \leqslant 1$, in contradiction with the fact that $\alpha \geqslant 2$.

We conclude that $\beta \geqslant 2 \alpha$, and the equation in the statement rewrites as $\alpha c^{\beta-2 \alpha}=\beta$. This means that $\alpha=1$ and that $\beta=c^{\beta-2}$. Since $\beta \geqslant 2$, it follows that $\beta-2 \geqslant 1$, i.e., $\beta \geqslant 3$. However, if $\beta \geqslant 5$, we observe that

$$
\beta=c^{\beta-2} \geqslant 2^{\beta-2} \geqslant\binom{\beta-2}{0}+\binom{\beta-2}{1}+\binom{\beta-2}{\beta-3}+\binom{\beta-2}{\beta-2}=\beta
$$

This means that $3 \leqslant \beta \leqslant 5$.

However, if $\beta=5$, the number $c=\beta^{1 /(\beta-2)}=5^{1 / 3}$ is not an integer. Conversely, if $\beta=3$, then $c=3$, so $a=3$ and $b=3^{3}$; if $\beta=4$, then $c=2$, so $a=2$ and $b=2^{4}$.

In conclusion, the only potential solution triplets are $(1,1),\left(2,2^{4}\right)$ and $\left(3,3^{3}\right)$. Conversely, it is easily verified that each of them works.