<s>[INST] Number theory: $x^y + 1 = y^x$ Today a friend told me the equality:
$2^3 + 1 = 3^2$, and I wondered if there exist more solutions to the general problem $$x^y + 1 = y^x$$ where $x$ and $y$ are integers. Some research led me to the result for $x^y = y^x$, which has no integer solutions except $x = 2$ and $y = 4$ (assumed $x\neq y$). Is this a related result, or do more integer solutions exist?
 [/INST] Consider function $f:(0,\infty)\rightarrow \mathbb{R}, f(x)=(1+\frac{n}{x})^x$ which is strictly increasing and $f(x)<e^n$.
I. $x<y, y=x+n, n>0$, integer
$$\begin{align} x^y+1=y^x 
\implies & x ^{x+n}+1=(x+n)^x  \\
\implies & x^n+\frac{1}{x^x}=(1+\frac{n}{x})^x<e^n \\
\implies & x<e \\
\implies & x=1, x=2\end{align}$$
For $x=1 \implies y=2$.
For $x=2 \implies 2^y+1= y^2 \implies y=3$
II. $x>y, x=y+k, k>0$, integer, using the idea of the situation I obtain the equation has no solution other than $(1,0)$.
The same method can solve equations:


*

*$x^y=y^x$

*$x^y+y=y^x+x$

*$x^y+x=y^x+y$
where $x>0, y>0$ integers.
</s>