TITLE: Find the number of pairs of positive integers $(a, b)$ such that $a!+b! = a^b$
QUESTION [26 upvotes]: How many pairs of positive integers $(a, b)$ such that $a!+b! = a^b$?
A straight forward brute-force reveals that $(2,2)$ and $(2,3)$ are solutions and this seems to be the only possible solutions, I was just wondering how could we prove this.

REPLY [3 votes]: I am hoping to prove the $a\le2$ part of the accepted solution without Bertrand's Postulate .  Let
$a>2$ , then $a-1>1$ , so $a-1$ is either prime or composite , in any case , there is a prime $p$ such 
that $p|a-1$ so that $p\le a-1<a$ , hence $p|a!$ ,  and since g.c.d.$(a,a-1)=1$ so $p$ does not divide $a$ 
Now since
 $a\le b$ , so from $a!\Big(1+ \dfrac{b!}{a!}\Big)=a!+b!=a^b$ we get , as $p|a!$ , so the left hand side is 
divisible by $p$ , hence we should also have $p|a^b \implies p|a$ , contradiction ! So $a\le 2$