Solving an exponential diophantine equation

diophantine equationselementary-number-theorynumber theory

I came across the following problem:
Find all positive integers $a,b$ such that
The following equation is satisfied by the two integers:
$5^b+2=7^c$

My Attempt: I tried equating both sides modulo 6. We know $7^c\cong 1\mod 6$. Hence $5^b\cong 5\mod 6$ which means $b=2k+1$. Thus the equation reduces to $7^c=2+5^{2k+1}$. Now I tried subtracting 7 from both sides to factor the terms which gives:
$7(7^c-1)=5(5^{2k}-1)$.
Now since 5 divides rhs it must divide lhs but since 7 is not divisible by 5 so 5 must divide the other factor
$7^(c-1)\cong 1\mod 5$ and thus $c=4p+1$. But all these efforts don't seem to help. Any help would be appreciated.

Best Answer

Better use a modulo where you can really look at the specifics of the case $b \ge 2$ or $c \ge 2$, because without either of those, you won't manage to prove much looking only at possible remainders (since the equality can stand with $b=c=1$).

For instance, modulo $25$, the LHS is always $2 \pmod{25}$, but you can check that \begin{align*} 7^{4k} & \equiv 1 \pmod{25} \\ 7^{4k+1} & \equiv 7 \pmod{25} \\ 7^{4k+2} & \equiv -1 \pmod{25} \\ 7^{4k+3} & \equiv -7 \pmod{25} \end{align*}

so no solution for $b \ge 2$. For $b=1$, it is obvious that we need $c=1$, and that is indeed a solution.

Related Question