5. Solve the equation $a^{b}+a+b=b^{a}$ in natural numbers.

(O. A. Pyayve, E. Yu. Voronetsky)
Answer: $a=5, b=2$.

Solution. If $a=1$ or $b=1$, there are no solutions.

If $b=2$, we get $2^{a}=a^{2}+a+1$. For $ab^{a}>a^{b}$

taking the logarithm and dividing by $ab$, we get:

$$
\frac{\ln \left(a+\frac{1}{a}\right)}{a}>\frac{\ln b}{b}>\frac{\ln a}{a}
$$

Let $f(x)=\frac{\ln (x)}{x}$. Note that $f(a)$ decreases for $a \geqslant 3$ and $f(2)=f(4)$ (the derivative of this function is $f^{\prime}(x)=\frac{1-\ln x}{x^{2}}$, and it is negative for $x \geqslant e$). Therefore, there are no solutions with $a=2, b \geqslant 4$ and $b \geqslant a \geqslant 3$.

On the other hand, it can be verified that

$$
\frac{\ln \left(a+\frac{1}{a}\right)}{a}\frac{a^{3}-3 a}{a(a-1)\left(a^{2}+1\right)}>0
$$

for $a \geqslant 3$.

Thus, the equation has no solutions for $a \geqslant 4$.

Remark. Instead of estimating $\left(a+\frac{1}{a}\right)^{b}$, one can use $(a+1)^{b}$ (which is valid for $b=2$), then the calculations are simplified, but more exceptions need to be considered.

Criteria. A guessed answer earns 1 point. Reasoning that shows at least one variable is bounded is worth 3 points.