3. Find the smallest prime $p$ such that there do not exist $a, b \in \mathbf{N}$, satisfying
$$\left|3^{a}-2^{b}\right|=p$$
3. Notice that, $2=3^{1}-2^{0}, 3=2^{2}-3^{0}, 5=2^{3}-3^{1}, 7=2^{3}-3^{0}, 11=3^{3}-$ $2^{4}, 13=2^{4}-3^{1}, 17=3^{4}-2^{6}, 19=3^{3}-2^{3}, 23=3^{3}-2^{2}, 29=2^{5}-3^{1}, 31=$ $2^{5}-3^{0}, 37=2^{6}-3^{3}$. Therefore, the required $p \geqslant 41$.

On the other hand, if $\left|3^{a}-2^{b}\right|=41$, there are two cases.
Case one: $3^{a}-2^{b}=41$, taking modulo 3 on both sides, we know $b$ is even; taking modulo 4 on both sides, we know $a$ is even. Let $a=2 m, b=2 n$, then $\left(3^{m}-2^{n}\right)\left(3^{m}+2^{n}\right)=41$, which gives $\left(3^{m}-2^{n}, 3^{m}+\right.$ $\left.2^{n}\right)=(1,41)$, leading to
$$2 \times 3^{m}=\left(3^{m}-2^{n}\right)+\left(3^{m}+2^{n}\right)=42$$

i.e., $3^{m}=21$, a contradiction.
Case two: $2^{b}-3^{a}=41$, in this case $b \geqslant 3$, taking modulo 8 on both sides leads to a contradiction.
In summary, the smallest prime $p=41$.