# Find all integer solutions to $\displaystyle{2^k = 9^m+7^n}$

I can only find the trivial ones $(m,n,k)$ as $(0,0,1), (1,1,4)$

Cannot find any more. Are there any more values? More imporantly how to show those are the only ones.

-

Suppose $m>0$. If $2^k = 9^m + 7^n$, then $2^k \equiv 1 \pmod 3$, thus $k \equiv 0 \pmod 2$. Put $k = 2l$ : $7^n = 4^l - 9^m = (2^l - 3^m)(2^l + 3^m)$.

If $(2^l - 3^m) > 1$, then both factors are multiples of $7$, and thus so is $3^m$, which is impossible. Thus $2^l - 3^m = 1$. The only solution to this is $l=2$ and $m=1$ which gives the $(1,1,4)$ solution.

If $m=0$ then we need $2^k - 7^n = 1$, and the only solutions to this are $k=1,n=0$ and $k=3,n=1$ which give the solutions $(0,0,1)$ and $(0,1,3)$.

In both cases, we use Catalan's (now proven) conjecture, stating that the only solution to $x^a - y^b = 1$ for $a,b > 1$ is $3^2=1+2^3$.

-

We start like mercio, but then use a simple parity argument. By looking at the equation modulo $3$, we can see that $k$ must be even, say $k=2l$. Thus $$7^n=(2^l-3^m)(2^l+3^m).$$ The two factors on the right are relatively prime, so $$2^l-3^m=1 \qquad \text{and} \qquad 2^l+3^m=7^n,$$ and therefore $$2^{l+1}=7^n+1 \qquad\qquad(\ast)$$ But $(\ast)$ has no solutions with $n>1$. Work modulo $16$. Note that if $w$ is even, then $7^w \equiv 1\pmod{16}$, and therefore if $w$ is odd then $7^w \equiv 7 \pmod {16}$.

If $n>1$ is even, then the right-hand side of $(\ast)$ is congruent to $2$ modulo $16$, while the left-hand side is divisible by $4$.

If $n>1$ is odd, then the right-hand side of $(\ast)$ is congruent to $8$ modulo $16$. For the left-hand side to be large enough, it must be a large power of $2$, so cannot be congruent to $8$ modulo $16$.

-