I made a passing comment under Max Alekseyev's cute answer to [this question](https://mathoverflow.net/questions/29926/3n-2m-pm-41-is-not-possible-how-to-prove-it) and Pete Clark suggested I raise it explicitly as a different question. I cannot give any motivation for it however---it was just a passing thought. My only motivation is that it looks like fairly elementary number theory but I don't know the answer.


OK so one problem raised in the question linked to above was "prove there are no solutions to $3^n-2^m=41$ in non-negative integers" and Aleksevev's answer was "go mod 60". It was remarked afterwards that going mod 601 or 6553 would also nail it. For example, modulo 6553 (which is prime), 3 has order 39, 2 has order 117, but none of the 39 values of $3^n-41$ modulo 6553 are powers of 2 modulo 6553.


My question (really just a passing remark) is:


Is there an integer $t$ such that the equation $3^n-2^m=t$ has no solutions in non-negative integers $m$, $n$, but for which there are solutions modulo $N$ for all $N\geq1$? (By which of course I mean that for each $N\geq1$ the equation is satisfied mod $N$ for some integers $m,n\geq0$ depending on $N$; I am not suggesting that $m$ and $n$ be taken modulo $N$ or are independent of $N$).


This for me looks like a "Hasse principle" sort of thing---in general checking congruences doesn't give enough information about solvability of the polynomial in integers and there are many examples of such phenomena in mathematics. As exponential Diophantine equations are harder than normal ones I would similarly expect the Hasse Principle to fail here, but others seemed to be more optimistic.



Proving non-existence of solutions to $3^n-2^m=t$ without using congruences
I believe this is closely related to the conjecture by Brenner and Foster [here](https://projecteuclid.org/journals/pacific-journal-of-mathematics/volume-101/issue-2/Exponential-Diophantine-equations/pjm/1102724775.full). They ask if an exponential Diophantine equation of the form $$\sum \epsilon\_i p\_i^{m\_i}=t$$ where $\epsilon\_i=\pm 1$ can be solved using modular arithmetic. I don't know if your special case is any easier but maybe that's a good place to start looking in case there is anything in literature.


