# Equation in integers $7^x-3^y=4$

I don't know how to solve $$7^x-3^y=4$$... I tried to see something $$\pmod 7$$ and $$\pmod 3$$ but it doesn't help at all. Can anyone give me some hints about it?

• $x$ and $y$ are supposed to be integers, aren't they? Commented May 9, 2019 at 18:08
• yes they are... I found (1,1), but then? How to find other solutions? Commented May 9, 2019 at 18:10
• See here, with $z=2$. This is a similar case. Actually, I found a solution here, in "Art of Problem Solving". Commented May 9, 2019 at 18:11
• According to this the only positive integers $n$ such that $n$ and $n+4$ are both perfect powers are $4,32$ and $121$ none of which are of the form you want. I'm not sure, though, whether the results in that table reflect proven theorems or just the current state of numerical searches.
– lulu
Commented May 9, 2019 at 18:12
• @lulu there is an elementary method when we have primes $p,q$ and $p^m - q^n = c.$ math.stackexchange.com/questions/1941354/… and math.stackexchange.com/questions/1946621/… Commented May 9, 2019 at 18:20

Note: these are not quite the same $$x,y$$ as in the question.
brief version, we reach $$7(7^x-1) = 3(3^y - 1) \; ,$$ assume that $$x,y > 0$$ and produce a contradiction.
As $$7 | (3^y - 1)$$ so that $$3^y \equiv 1 \pmod 7 \; ,$$ we find $$6 | y$$
Then $$(3^6 - 1 )| (3^y - 1)$$ while $$3^6 - 1 = 8 \cdot 7 \cdot 13$$
Next $$13 | (7^x - 1)$$ so that $$7^x \equiv 1 \pmod {13},$$ so $$12|x$$ and we use $$3 | x.$$ Then $$7^3 - 1 | 7^x - 1,$$ while $$7^3 - 1 = 2 \cdot 9 \cdot 13.$$
We have reached $$9 | 3 (3^y-1) \; , \;$$ or $$3 | (3^y-1) \; , \;$$ which contradicts $$y > 0.$$