# Distance between powers of 2 and 3

As we know $3^1-2^1 = 1$ and of course $3^2-2^3 = 1$. The question is that whether set $$\{\ (m,n)\in \mathbb{N}\quad |\quad |3^m-2^n| = 1 \}$$

is finite or infinite.

• well en.wikipedia.org/wiki/Catalan%27s_conjecture has been proved by mihailescu. Or are you looking at a simpler proof that does not use that theorem? – Ant Oct 4 '14 at 18:48
• Thanks a lot.How it proves does not matter for me. What we have for other integers? – Abdollah Oct 4 '14 at 18:50
• Have you read the link? It says that the only solution to $x^a - y^b = 1$ , where $x, y, a, b$ are integers, is $3^2 - 2^3 = 1$. So for other integers your set is empty! – Ant Oct 4 '14 at 18:53
• Integers larger than $1$. Just correcting in case someone reading gets confused. – Slade Oct 4 '14 at 18:57
• Relate MO post: Are there any solutions to $2^n-3^m=1$. – Martin Sleziak Sep 16 '17 at 16:10

Note first that if $3^{2n}-1=2^r$ then $(3^n+1)(3^n-1)=2^r$. The two factors in brackets differ by $2$ so one must be an odd multiple of $2$, and this is only possible if $n=1$ (the only odd number we can allow in the factorisation is $1$)
Now suppose that $3^n-1=2^r$ and $n$ is odd. Now $3^n\equiv -1$ mod $4$ so $3^n-1$ is not divisible by $4$.
Now suppose $3^n=2^{2r}-1=(2^r+1)(2^r-1)$. The two factors differ by $2$ and cannot therefore both be divisible by $3$. Only $r=1$ is possible.
The final case is $3^n=2^{k}-1$ where $k$ is odd. Now the right hand side is $\equiv -2$ mod $3$, so only $k=1$ is possible, and $n=0$ (if permitted).