TITLE: Solve $3^a-5^b=2$ for integers a and b.
QUESTION [6 upvotes]: So I have got that (a,b)=(1,0),(3,2) are solutions for the eqations, and maybe the only one.

REPLY [3 votes]: We know that $b$ is even (since $2^b+2$ is divisible by 3).
We also know that the only solution to $y^2+2=x^3$ is $y=5,x=3$.
(Solving the diophantine equation $y^{2}=x^{3}-2$)
Thus it is sufficient to show that $a$ is divisible by 3.
Suppose that $a \geq 2$. Since 9 divides $5^b+2$, we get that $b=6k+2=3m+2$.
We have $25(125)^m+2=3^a$. We get $3^a$ is $27$ mod $31$ which forces $a$ to be $3$ mod $30$, in particular divisible by $3$.