Find all integer solutions m,n such that ${3^m}-{7^n}=2$. I came across this problem on artofproblemsolving.com. So far its been days and there has been no answer to this question:

Find all integer solutions m,n such that: $${3^m}-{7^n}=2$$

I tried using modular arithmetic and Fermat's little theorem on this with no yield. Any and all help is appreciated.
 A: If $n=0$ then $m=1$. If $n\geq 1$ then $m\geq 2$ and $3^m-2\equiv 0 \pmod{7}$ iff $m=6k+2$.
Moreover $7^n+2\equiv 9\equiv 9^{3k+1}\pmod{36}$ iff $n=6j+1$. Therefore it remains to solve
$$3^{6k+2}-7^{6j+1}=2$$
that is
$$9(3^{6k}-1)=7(7^{6j}-1)$$
We claim that $k=j=0$ is the only solution and therefore the given equation ${3^m}-{7^n}=2$ has just two solutions $(m,n)$: $(1,0)$ and $(2,1)$.
Assume that $k,j\geq 1$. Note that the prime $43$ divides $(7^6-1)$ and therefore it divides also the right-hand side. It follows that $7$ divides $k$. Then $7^2$ is a factor of $3^{42}-1$ which is a factor of the left-hand side. But then we have a contradiction: $7^2$ divides $7(7^{6j}-1)$ with $j\geq 1$.
A: Maybe this will help.
If $n>0$, then $3^m \equiv 2 \pmod{7}$ so we know $m$ is even, say $m=2k$.  Then the equation can be written
$$(8+1)^k - (8-1)^n = 2.$$
But that's all I got.
A: For $n=0$ we get the atypical solution $3-1=2$.
Assume now $n>0$. Then $7^n$ is divisible by $7$, and this imposes a condition on $3^m$ to be $2$ mod seven, so $m$ is of the shape $2+6m'$.
This further imposes a condition on $7^n$ modulo $9$, so $n=1+3n'$. We get now the following equation:
$$
9\cdot 3^{6m'} - 7\cdot 7^{3n'}= 2\ .
$$
There is an obvious solution, $9-7=2$. (For $m'=n'=0$.)
Now we can enumerate some ideas to attack the question, which is not a trivial one, as the following references show it.
IDEAS:


*

*So any solution induces a rational point on the curve $9x^6-7y^3=2$. This curve has genus $>1$, so there are finitely many points on it, a result of Faltings. (It implies also that on each Fermat curve there are only finitely many points, this was the motor behind this development in the arithmetic algebraic geometry.) This can be made also explicit, applying the theory.

*Any solution defines also a point $(x,y)$ satisfying the equation $$x^2-7y^2=2\ .$$ Moreover, $x$ is a power of $3$, and $y$ a power of $7$. This is a generalized Pell type equation, so we are performing arithmetics in the quadratic number field $\Bbb Q(\sqrt 7)$, which has class number one, thus unique decomposition in prime factors. Each solution induces an element $x+y\sqrt 7$ of norm two, so one which can then be written as a product of a special solution, here $3-\sqrt 7$, and an integer unit. The group of units in the ring $\Bbb Z[\sqrt 7]$, the (algebraic) integers ring of the field, is generated by $8-3\sqrt 7$. So we can write for a suitable power $k$: $$x\pm y\sqrt 7 = (3-\sqrt 7)(8-3\sqrt 7)^k\ .$$ The $\pm$ signs are always the same. This gives a combinatorial formula for $x$, and an other one for $y$. One can try now to show that either one formula, or the other one does not provide a power of $3$, resp $7$. But this is not a simple task. Just an idea.

*One other idea is to observe that for $m,n>0$ a solution of the given equation induces an integer point on the elliptic curve $E$ with equation $$E\ :\qquad y^2 = x^3+2\cdot 7^2\ .$$ (From the special solution $3^2=7^1+2$ we multiply with $7^2$ getting $21^2=7^3+2\cdot 7^2$. So there is a rational point, even integral point $P= (7,21)$ on $E$. Using the theory of elliptic curves, and the "standard algorithms", we can conclude that the point $P$ is the only integral point. Here is a dialog with sage, that "computes" the integral points.
sage: E = EllipticCurve( QQ, [0, 2*49] )
sage: E.integral_points()
[(7 : 21 : 1)]

sage: E = EllipticCurve( QQ, [0, 2*49] )
sage: E
Elliptic Curve defined by y^2 = x^3 + 98 over Rational Field

sage: E.rank()
1

sage: E.gens()
[(7 : 21 : 1)]

sage: E.integral_points()
[(7 : 21 : 1)]

This is already a complete solution from my perspective.

*A final word on the equations involving powers of fixed bases, generalizing the given equation. I found on the net for instance the reference Michael E. Bennett, On some exponential equations of S. S. Pillai . 
(See also Michael Waldschmidt, Perfect powers: Pillai's work and their developments.)
Pillai considered around 1930 equations of the shape $a^x-b^y=c$, with "fixed" integral bases $a,b$ and a constant $c$ on the R.H.S. and natural solutions $x,y>0$ are searched. One aspect studied in this world is for which values of the "constant data" $a,b,c$ there are more then two solutions. Please look in the references, and in the article for the list and the methods to attack such a question. At any rate, the tuple $(3,7,2)$ is not in the list, so there are strictly less than two solutions. And we have already one.
These last references show that problems as in the OP are not an "easy task", at least when considering them in a bundle, not as isolated problems 
A: There are two easy and obvious solutions:
$$ 3^1-7^0 = 2 $$
$$ 3^2-7^1 = 2 $$
But for more complex solutions the problem is more complicated, and has to do with the logarithmic relationship between 3 and 7:
$$ log_3 (7) = \frac {ln(7)}{ln(3)} = 1,77124374916142226006792830708...$$
That constant expressed as a continuous fraction is:
$$ log_3 (7) = [1; 1, 3, 2, 1, 2, 4, 22, 32, 3, 1, 6, 5, 1, 1, 2, 10, ...] $$
The first number [1] gives the integer 1, the first two numbers [1; 1] give the integer 2, and which are the first two solutions.
The first 3 numbers [1; 1,3] give the number 7/4. But, although it approaches the problem, it is not a solution:
$$ 3^7 - 7^4 = 2187 - 2401 = -214 $$
The first $7$ numbers, before $22$, $ [1; 1, 3, 2, 1, 2, 4] $, give a good approximation but not enough to be a solution:
$$ 3^{271} - 7^{153} = 1,994619355... \cdot 10^{129} - 1,995262876... \cdot 10^{129} \neq 2$$
I believe that there are no other solutions, apart from the first two, since the difference grows very quickly in the best cases.
