Example 14 (2003 National Training Team Problem) A positive integer $n$ cannot be divisible by 2 or 3, and there do not exist non-negative integers $a, b$, such that $\left|2^{a}-3^{b}\right|=n$. Find the minimum value of $n$.
Solve for $n=1$, $\left|2^{1}-3^{1}\right|=1 ; n=5$. when, $\left|2^{2}-3^{2}\right|=5 ; n=7$ when, $\left|2^{1}-3^{2}\right|=7 ; n=$ 11 when, $\left|2^{4}-3^{3}\right|=11 ; n=13$ when, $\left|2^{4}-3^{1}\right|=13 ; n=17$ when, $\left|2^{6}-3^{4}\right|=17 ; n=19$ when, $\left|2^{3}-3^{3}\right|=19 ; n=23$ when, $\left|2^{5}-3^{2}\right|=23 ; n=25$ when, $\left|2^{1}-3^{3}\right|=25 ; n=29$ when, $\mid 2^{5}-$ $3^{1} \mid=29 ; n=31$ when, $\left|2^{5}-3^{0}\right|=31$.
Next, we prove that $n=35$ satisfies the requirement, using proof by contradiction.
If not, there exist non-negative integers $a, b$ such that $\left|2^{a}-3^{b}\right|=35$.
(1) If $2^{a}-3^{b}=35$, clearly $a \neq 0,1,2$, so $a \geqslant 3$. Modulo 8, we get $-3^{b} \equiv 3(\bmod 8)$, i.e., $3^{b} \equiv 5(\bmod 8)$, but $3^{b} \equiv 1,3(\bmod 8)$, which is impossible.
O
l
y
m
p
i
c
M
a
t
h
e
m
a
t
i
c
s
'
N
u
m
b
e
r
T
h
e
o
r
y
P
r
o
b
l
e
m
(2) If $3^{b}-2^{a}=35$, it is easy to see that $b \neq 0,1$. Modulo 9, we get $2^{a} \equiv 1(\bmod 9)$.
And $\left\{2^{k}(\bmod 9)\right\}: 2,4,8,7,5,1,2,4, \cdots$, i.e.,
$2^{6 k} \equiv 1(\bmod 9), 2^{6 k+1} \equiv 2(\bmod 9), 2^{6 k+2} \equiv 4(\bmod 9)$,
$2^{6 k+3} \equiv 8(\bmod 9), 2^{6 k+4} \equiv 7(\bmod 9), 2^{6 k+5} \equiv 5(\bmod 9)$.
Thus, $a=6 k$, where $k$ is a non-negative integer, so $3^{b}-8^{2 k}=35$.
Modulo 7, we get $3^{b} \equiv 1(\bmod 7)$, and $\left\{3^{k}(\bmod 7)\right\}: 3, 2, 6, 4, 5, 1, 3, 2, \cdots$, so $b=6 k^{\prime}$, where $k^{\prime}$ is a positive integer, so $3^{6 k^{\prime}}-2^{6 k}=35$, i.e., $\left(3^{3 k^{\prime}}-2^{3 k}\right)\left(3^{3 k^{\prime}}+2^{3 k}\right)=35$,
Therefore, $\left\{\begin{array}{l}3^{3 k^{\prime}}-2^{3 k}=1, \\ 3^{3 k^{\prime}}+2^{3 k}=35,\end{array}\right.$ or $\left\{\begin{array}{l}3^{3 k^{\prime}}-2^{3 k}=5, \\ 3^{3 k^{\prime}}+2^{3 k}=7 .\end{array}\right.$
Thus, $3^{3 k^{\prime}}=18$ or 6, which is impossible.
In conclusion, the smallest $n$ is 35.