Find all pairs $(m,n)$ of strictly positive integers such that

$$
\mathrm{m}!+\mathrm{n}!=\mathrm{m}^{\mathrm{n}}
$$

Note. For any integer $n$, recall that $n!$ denotes the integer $1 \times 2 \times 3 \times \cdots \times n$.
We easily check that the pairs $(2,2)$ and $(2,3)$ are solutions. We will show that these are the only ones.
We start by dealing with the case where $m$ or $n$ is 1 or 2. If $m=1$, then $m^n=1$ but $m!+n!\geqslant 2$, so there is no solution. If $m=2$, the equation becomes $2+n!=2^{n-1}$. If $n \geqslant 4$, then the left-hand side is congruent to 2 modulo 4, and the right-hand side to 0, so $n$ must be 1, 2, or 3, and $n=1$ does not work. If $n=1$, the equation becomes $m!+1=m$, but $m$ divides $m!$ and $m$, so $m$ divides 1 and $m=1$, but $(1,1)$ is not a solution. Finally, if $n=2$, we get $m!+2=m^2$. But $m$ divides $m!$ and $m^2$ so $m$ divides 2, so $m$ is 1 or 2 and we fall back on cases already treated.
We now deal with the case $2<m \leqslant n$. In this case, $m!$ divides $n!$ so $m!$ divides $m^n$. In particular, $m-1$ divides $m!$ and thus also $m^n$, but $m-1$ is coprime with $m$, and thus also with $m^n$. Therefore, $m-1$ can only be 1, so $m=2$, a contradiction.
Finally, we deal with the case $2<n<m$. In this case, $n!$ divides $m!$, so we can write $n!\left(1+\frac{m!}{n!}\right)=m^n$. In particular, $1+\frac{m!}{n!}$ divides $m^n$. But $\frac{m!}{n!}=(n+1)(n+2) \ldots m$ is divisible by $m$, so $1+\frac{m!}{n!}$ is coprime with $m$, and thus with $m^n$. We therefore have $1+\frac{n!}{m!}=1$, which is impossible.