# Solution in integers to $2^n+n=3^m$

How to find all positive integers $m,n$ such that $2^n+n=3^m$ ?

We have by inspection $(m,n)=(0,0)$ and $(1,1)$

And there are no more for m and n both less then $100$.

-
By analyzing residues modulo 6 you can tell that if n>0, then $n\cong 1 mod 6$. Maybe something in that direction could help? – tomasz Jun 1 '12 at 15:51
@mother_to_5: Where did you find this problem? Is it a contest problem, or did you propose yourself. Such information can be helpful for users. – user9413 Jun 1 '12 at 15:57
I proposed the problem myself. I have some related questions too, what is the density of numbers of the form x^m-y^n, for given x and y? – user1708 Jun 1 '12 at 16:04
I'm pretty sure there are no other solutions for n<1000. – tomasz Jun 1 '12 at 16:04
There are no solutions for $n < 10^9.$ – Ragib Zaman Jun 1 '12 at 17:31

In this paper Lemma 2.2 gives that if $p,q \in \mathbb{Z}^+$ then $$\left|\log_3 2-\frac{p}{q}\right|\ge \frac{1}{1200 q^{14.3}}$$ limiting how closely $\log_3 2$ can be approximated by rationals. It then follows that if $m\log 3 = n\log 2 + \epsilon$ with $\epsilon>0$ then $\epsilon\ge \frac{\log 3}{1200 n^{14}}$ and \begin{align} 3^m & > 2^n (1+\epsilon) \\ & = 2^n + \frac{2^n \log 3}{1200 n^{14}} \end{align} The second term is greater than $n$ for $n>112$, and a computer check also excludes $2\le n\le 112$, so there are no other solutions.

-

Not a complete answer but some information about possible solutions $n, m$ can be deduced. Suppose that $n, m > 0$ and write

$$m = \frac{\log(2^n + n)}{\log(3)}.$$

Since $\log(x + y) < \log(x) + y/x$ for all real $x, y > 0$ this implies that

$$\frac{\log(2^n)}{\log(3)} < m < \frac{\log(2^n)}{\log(3)} + \frac{n}{2^n \log(3)}$$

and therefore that

$$0 < \frac{m}{n} - \frac{\log(2)}{\log(3)} < \frac{1}{2^n \log(3)}.$$

So $\tfrac{m}{n}$ is very close to $\tfrac{\log(2)}{\log(3)}$. So close in fact that it must appear as an upper bound in its continued fraction expansion. This at least makes it a bit simpler to scan for possible solutions.

-