# Find all solutions to the diophantine equation $7^x=3^y+4$ in positive integers. [duplicate]

Find all solutions to the diophantine equation $$7^x=3^y+4$$ in positive integers. I couldn't have much progress.

Clearly $$(x,y)=(1,1)$$ is a solution. And there's no solution for $$y=2$$.

Assume $$y \ge 3$$ and $$x \ge 1$$.

By $$\mod 9$$, we get $$7^x \equiv 4\mod 9 \implies x \equiv 2 \mod 3$$.

By $$\mod 7$$,we get $$y \equiv 1 \mod 6$$.

I also tried $$\mod 2$$ but it didn't work.

• General remark: since there is a solution, namely $(1,1)$, congruences alone won't get it done, though of course you can use congruences to eliminate a lot of cases.
– lulu
Commented Nov 13, 2020 at 1:13
• @lulu there is a method that usually wors with small numbers math.stackexchange.com/questions/1941354/… and many others Commented Nov 13, 2020 at 1:22
• @SunainaPati FYI, your equation is $7^x - 3^y = 4$. For $x, y \gt 1$, the table in the Generalization section of Wikipedia's "Catalan's conjecture" article shows for a difference of $4$, there are only $3$ solutions with perfect powers less than $10^{18}$. These are $8 - 4 = 2^3 - 2^2$, $36 - 32 = 6^2 - 2^5$ and $125 - 121 = 5^3 - 11^2$. Thus, there's no solution for powers of $7$ and $3$ within that range, implying (but not proving) there are no other solutions than the $(1,1)$ one you've already found. Commented Nov 13, 2020 at 1:22
• @SunainaPata Also note later in that article, Pillai's conjecture states "... each positive integer occurs only finitely many times as a difference of perfect powers ...". Commented Nov 13, 2020 at 1:24
• @WillJagy Thanks for your feedback. I was just reading your answer for this specific equation when you commented. Commented Nov 13, 2020 at 1:29

• Thank you !!! Those link are really helpful :) Commented Nov 13, 2020 at 6:48

It's $$3(3^a-1)=7(7^b-1)$$ with $$a=x-1$$ and $$b=y-1$$.

Therefore $$7\mid3^a-1$$, so $$a$$ is a multiple of (what?).

Therefore, $$3^a-1$$ is a multiple of $$13$$.

Therefore, $$7^b-1$$ is a multiple of $$13$$.

Therefore, $$b$$ is a multiple of (what?).

Therefore, $$7^b-1$$ is a multiple of $$9$$.

Therefore, $$3(3^a-1)$$ is a multiple of $$9$$.

Therefore, $$a$$ is (what?).

Therefore, $$x$$ is (what?).

• Yes!! I got it :) Thankyou !!!! Commented Nov 13, 2020 at 6:49