Find all solutions in positive integers to $a^b -b^a = 3$
It appears that the only solution is $a=4, b=1$.
Modular arithmetic is not of much help (apart from deriving that $a,b$ must have opposite parity).
We know that $a^x$ dominates the polynomial $x^a$ but this does not seem to yield the result.
Tried hard to estimate a bound for $a^b - b^a$ but with no success.
Any help is appreciated. This is a problem from a regional mathematics Olympiad.
Added on 26 March, 2017:
I was trying to find a solution that involves no Calculus (or a minimum of Calculus) since this is a problem from a Junior Olympiad in which the students do not have a knowledge of Calculus. The following argument seems to work. Please point out flaws/mistakes, if any.
Lemma 1 For any $n \geq 4$, $$n^{n+1} - (n+1)^n > (n-1)^n - n^{n-1}$$ Proof \begin{align*} &\qquad n^{n+1} - (n+1)^n > (n-1)^n - n^{n-1} \\ &\Leftrightarrow n^{n+1} + n^{n-1} > (n-1)^n + (n+1)^n \\ &\Leftrightarrow n+\frac{1}{n} > \left(1-\frac{1}{n}\right)^n + \left(1+\frac{1}{n}\right)^n \end{align*} Since $\left(1+\frac{1}{n}\right)^n < 3$ and $\left(1-\frac{1}{n}\right)^n < 1$, we have $$\left(1+\frac{1}{n}\right)^n+\left(1-\frac{1}{n}\right)^n < 4 < n +\frac{1}{n}$$ Lemma 2 For any $k$ and $n \geq 4$, $$n^{n+k} -(n+k)^n > n^{n+1} - (n+1)^n$$ Proof \begin{align*} &\qquad n^{n+k} -(n+k)^n > n^{n+1} - (n+1)^n \\ &\Leftrightarrow n^{n+k} -n^{n+1} > (n+k)^n - (n+1)^n \\ &\Leftrightarrow n^k - n > \left(1+\frac{k}{n}\right)^n - \left(1+\frac{1}{n}\right)^n \end{align*} Since $\left(1+\frac{k}{n}\right)^n < 3^k$ and $\left(1-\frac{1}{n}\right)^n < 1$, we have $$\left(1+\frac{k}{n}\right)^n+\left(1-\frac{1}{n}\right)^n < 3^k +1 < n^k - n $$ as $n > 4$.
Now suppose that $a^b - b^a = 3$. Let $a \geq 4$. If $b = a+k > a$, then we have \begin{align*} a^{a+k} - (a+k)^a &> a^{a+1} - (a+1)^a \\ &> (a-1)^a - a^{a-1} \\ &> \cdots \\ &> 3^4 - 4^3 = 17 \end{align*} Thus there are no solutions with $b > a \geq 4$.
If $a > b \geq 4$, then $$a^b - b^a = -(b^a - a^b) \leq -17 $$ from what we have seen above. Thus there are no solutions if $a > b \geq 4$. Thus all solutions can be only in the range $1 \leq a,b \leq 4$. Clearly, in this range only $a=4, b=1$ satisfies the given equation.