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$.


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.