# $|2^x-3^y|=1$ has only three natural pairs as solutions

Consider the equation $$|2^x-3^y|=1$$ in the unknowns $x \in \mathbb{N}$ and $y \in \mathbb{N}$. Is it possible to prove that the only solutions are $(1,1)$, $(2,1)$ and $(3,2)$?

-
 What kind of numbers are $x$ and $y$? – Siminore Jun 30 '12 at 10:43 @Siminore, the title asks for "natural pairs" so presumably what's wanted is natural numbers. – Gerry Myerson Jun 30 '12 at 10:47 Ok, I'll edit the question to make it more explicit. – Siminore Jun 30 '12 at 10:50 Thanks for the edit, Siminore :) – Andrius Naruševičius Jun 30 '12 at 11:00

Yes. Levi ben Gerson (1288-1344), also known as Gersonides, proved this. The Gersonides proof can be found here.

-
Ah, number theory is always amazing! – Siminore Jun 30 '12 at 10:52

This is an easy consequence of Catalan's conjecture, which was famously proved by Preda Mihăilescu in 2002 (so now it's also called Mihăilescu's theorem):

$3^2-2^3=1$ is the only solution to $x^a - y^b = 1$ for integers $a, b, x, y \ge 2$.

-
True, but that is killing a fly with an atom bomb. – Gerry Myerson Jun 30 '12 at 11:01
That's going too far, Gerry! I'm using a sledgehammer to crack a nut, is all. – TonyK Jun 30 '12 at 11:02

Assume that $x>3$ and $y>2$.

$3^2=1\pmod{8}$. Since $3\not=-1\pmod{8}$ we know that $3^y\not=-1\pmod{8}$. Thus, if $|2^x-3^y|=1$, we must have $2^x-3^y=-1$ and $y$ must be even. Thus, we get that $$2^x=(3^{y/2}-1)(3^{y/2}+1)\tag{1}$$ The only factors of a power of $2$ are other powers of $2$, and the only powers of two that differ by $2$ are $2$ and $4$, but since $y>2$, we have $3^{y/2}-1>2$ and $3^{y/2}+1>4$.

Therefore, there are no $x>3$ and $y>2$ so that $|2^x-3^y|=1$.

-
 Wow this proof looks even better than the Levi's one :O – Andrius Naruševičius Jun 30 '12 at 20:03 @AndriusNaruševičius: I just saw the link in Gerry's answer (since you mentioned it). It seems to be the same idea, just reorganized a bit. I did what I thought was the hard case, because the other cases seem almost trivial. – robjohn♦ Jun 30 '12 at 20:42 Still looks more understandable to an average person :) – Andrius Naruševičius Jul 1 '12 at 6:50