1

Here's a question that I saw:

Solve the inequality $|p^q-q^p|\leq 2$, where $p,q$ are primes.

Here is my attempt (although there's not much to it):

Consider $p=3,q=2$ or $p=2,q=3$. By Mihăilescu's theorem, this is the only possible solution for $|p^q-q^p|=1$.

But then what should I do next? I have no idea. Please help.

blastzit
  • 830

1 Answers1

5

I will prove that for any positive integers $a,b$ which satisfies $2<a<b$, $a^b>b^a+2$.

Indeed, $3^4>4^3+2$ and if $3<a$, then $a>e+1>\left(1+\frac{1}{a}\right)^a+\frac{2}{a^a}$ therefore $a^{a+1}>(a+1)^a+2$ for $a>2$. Also, $$a^{k+1}>a^k\cdot a>a(k^a+2)>ek^a+2>\left(1+\frac{1}{k}\right)^ak^a+2=(k+1)^a+2$$for $k\ge a$ we can use mathematical induction.

Therefore, at least one of $p,q$ is $2$ unless $p=q$. WLOG, let $p=2$ then $q<5$, if not, $2^q>q^2$.

Now one can get all the solutions of the inequality.

didgogns
  • 3,637