Is it true that for every integer $r$, the equation $2^m = 3^n + r$ has at most a finite number of integer solutions? I understand that this is a special case of Pillai's conjecture, which is unsolved. If the statement is true, then can we verify the finiteness of the solution set using modular arithmetic? To be precise, is the following proposition true? $$\forall r,\ \exists M,\ \exists N,\ \forall m,n \ge N,\ \ 2^m \not\equiv 3^n + r \pmod{M}$$ I have verified the proposition for $0 \le r \le 12$, and found the least possible modulus $M(r)$ for each $r$ in this interval. Note that $M(r) = 2$ if $r$ is even. $M(1) = 8$, $M(3) = 3$, $M(5) = 1088$, $M(7) = 1632$, $M(9) = 3$, $M(11) = 8$.