Determine all pairs $(m, n)$ of non-negative integers that satisfy the equation

$$
3^{m}-7^{n}=2
$$
The pairs $(1,0)$ and $(2,1)$ are solutions. Let $(m, n)$ be a solution with $m, n \geq 2$. The solution consists of three steps:

1. It holds that $7^{n} \equiv -2 \bmod 9 \Longleftrightarrow n \equiv 1 \bmod 3$.
2. It holds that $3^{m} \equiv 2 \bmod 49 \Longleftrightarrow m \equiv 26 \bmod 42$.
3. The conditions from 1 and 2 lead to a contradiction modulo 43.

Step 1: We have $7^{1} \equiv 7, 7^{2} \equiv 4$, and $7^{3} \equiv 1 \bmod 9$, after which the remainders are periodic with period 3. From the original equation, it follows that $7^{n} \equiv 7 \bmod 9$, thus $n \equiv 1 \bmod 3$.
Step 2: First show $m \equiv 2 \bmod 6$ analogously to Step 1. By Euler's theorem, $3^{42} \equiv 1 \bmod 49$, so the period is at most 42. Using $3^{6} \equiv -6 \bmod 49$, we get:

| $m$ | 2 | 8 | 14 | 20 | 26 | 32 | 38 |
| :--- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
| $3^{m} \bmod 49$ | 9 | 44 | 30 | 16 | 2 | 37 | 23 |

Thus, $3^{m} \equiv 2 \bmod 49$ if and only if $m \equiv 26 \bmod 42$.
Step 3: Write $m=42 m^{\prime}+26$ and $n=3 n^{\prime}+1$. Considering the original equation modulo 43, we get, using Fermat's little theorem and $7^{3} \equiv -1 \bmod 43$,

$$
3^{42 m^{\prime}+26}-7^{3 n^{\prime}+1} \equiv 3^{26}-(-1)^{n^{\prime}} \cdot 7 \equiv 15-(-1)^{n^{\prime}} \cdot 7 \not \equiv 2 \quad \bmod 43
$$

Thus, there are no further solutions.
Remarks: This problem was not solved by any participant. A common gap in the approaches was the following: From $a^{b} \equiv a^{c} \bmod M$ it does not follow that $b \equiv c \bmod \varphi(M)$, as the relevant example $a=7, b=4, c=1, M=9$ for the problem shows.
Due to the periodicity of the power residues, it is not possible to derive a contradiction modulo 43 or another prime $\neq 3,7$ directly from $3^{m}-7^{n}=2$, because the equation does have solutions. Only with additional constraints obtained using the primes 3 and 7 does one obtain the desired contradiction.