Since 3m−2≡0(mod7), one may easily show that m≡2(mod6). If m=2 then n=1, which is a solution of the equation.
Assume that m=2s≥4. Note that 2+7n is divisible by 27 in this case and
79≡1(mod27),71≡−2(mod27).
Hence we have n≡4(mod9). If we let n=9t+4, then
2+79t+4≡2+74≡35(mod37).
For any positive integer u less than 10,
9n≡9,7,26,12,34,10,16,33,1(mod37).
Therefore there does not exist a solution for any m≥4. □