<s>[INST] Primes as a difference of powers Find the smallest prime that cannot be written as
$$|3^a - 2^b|$$   
EDIT: I forgot to mention that $a$ and $b$ are whole numbers.

I tried to expand $3^a$ as $(2+1)^a$ using binomial theorem but I couldn't infer much. Please help. Thanks in advance!

 [/INST] $41$ is the answer. 
For $41=3^a-2^b$, clearly $b \not =0, 1, a \not =0$. $\pmod{3}$ gives $b$ even, $\pmod{4}$ gives $a$ even. Then $41=(3^{\frac{a}{2}}-2^{\frac{b}{2}})(3^{\frac{a}{2}}+2^{\frac{b}{2}})$, so $3^{\frac{a}{2}}-2^{\frac{b}{2}}=1, 3^{\frac{a}{2}}+2^{\frac{b}{2}}=41$, which is clearly impossible.
For $41=2^b-3^a$, clearly $b \geq 3$. $\pmod{8}$ gives a contradiction. 
Note $2=3^1-2^0, 3=2^2-3^0, 5=2^3-3^1, 7=3^2-2^1, 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$.

P.S. Try this problem instead:

Determine whether there are infinitely many primes $p$ s.t. $p$ cannot be expressed as the sum or difference of a power of $2$ and a power of $3$, i.e. $p \not =|3^a \pm 2^b|$.

</s>