Let $x$ and $y$ be natural numbers. How do I solve the equation $5^x-3^y=2$?
I think the only answer is $(x,y)=(1,1)$
I thought about this problem as follows.
From $5^2-3^3=-2$
$5^x+5^2=3^y+3^3$
$25(5^{x-2}+1)=27(3^{y-3}+1)$
Define an integer k greater than or equal to 1
$5^{x-2}=27k-1$
$3^{y-3}=25k-1$
And from $5^1-3^1=2$
$5^x-5=3^y-3$
$5(5^{x-1}-1)=3(3^{y-1}-1)$
Define an integer m greater than or equal to 1
$5^{x-1}=3m+1$
$3^{y-1}=5m+1$
Repeating formula deformations but finding nothing.I wanted to show that there is no solution other than $(x,y)=(1,1)$.
This can be solved with a bit of modular arithmetic.
First of all, obviously $x$ and $y$ are nonzero. So $5\mid 5^x$, and $3^y\equiv3\pmod5$, so $y\equiv1\pmod4$.
Now $3^y\equiv3\pmod{3^4-1}$ and $3^4-1=16\cdot5$. So $5^x\equiv5\pmod{16}$, so $x\equiv1\pmod4$.
Now $5^x\equiv5\pmod{5^4-1}$ and $5^4-1=16\cdot3\cdot13$. So $3^y\equiv3\pmod{16}$ and $3^y\equiv3\pmod{13}$. So we get $y\equiv1\pmod4$ and $y\equiv1\pmod3$, so $y\equiv1\pmod{12}$.
Now $3^y\equiv3\pmod{3^{12}-1}$ and $3^{12}-1=16\cdot5\cdot7\cdot13\cdot73$. So $5^x\equiv5\pmod7$, thus $x\equiv1\pmod6$. Combining with $x\equiv1\pmod4$, we see $x\equiv1\pmod{12}$.
Now $5^x\equiv5\pmod{5^{12}-1}$ and $5^{12}-1=16\cdot9\cdot7\cdot13\cdot31\cdot601$. This basically ends the argument, since we now (finally!) have a modulus $9=3^2$, so $3^y\equiv3\pmod9$, so $y=1$. Thus the only solution is $(x,y)=(1,1)$.