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$.



Does 2^m = 3^n + r have finitely many solutions for every r?
Yes, it is true that this kind of equation ax+by=c, where a,b,c are non-zero and fixed and x,y are allowed to only have prime factors in a finite set, has only finitely many solutions. This is a special case of Siegel's theorem on integral points on curves. 


Your second question may be unknown in the generality you pose. It is interesting that it holds. A remark: if there is a solution to $2^m = 3^n + r$, then $2^{m+k\phi(M)} \equiv 3^{n+k\phi(M)} + r (\mod M)$ for all $k,M$ if $(M,6)=1$, so if $M$ exists in this case, then $(M,6)>1$. If there is no solution to the equation $2^m = 3^n + r$, then the existence of $M$ (with $N=0$) is a special case of a conjecture of Skolem.


T. Skolem: Anwendung exponentieller Kongruenzen zum Beweis der
Unlösbarkeit gewisser diophantischer Gleichungen., Avh. Norske Vid. Akad.
Oslo, 12 (1937), 1–16.


Another comment. There are no solutions when $r=11$ but $M=8$ doesn't work since $2^2 \equiv 3^2 + 11 \mod 8$. $M(11)=205$. (Edit: $M(11)=8$ is OK. I misunderstood the definition, see comments)


