<s>[INST] Solutions for diophantine equation $3^a+1=2^b$ I am looking for solutions for the diophantine equation  
$3^a+1=2^b$
where $a\in \Bbb N$ and $b\in \Bbb N$. 

Is there a power of $3$ that gives a power of $2$ when you add $1$?

Two solutions are easy to find:


*

*$3^0+1=2^1 \rightarrow 1+1=2$

*$3^1+1=2^2 \rightarrow 3+1=4$


But I'm looking for other solutions (solutions where $a>1$).
I believe that there is no other solution, but how can you proof this conjecture?
More general:
How can you find solutions for
$p_1^a+n=p_2^b$
where $p_1$ and $p_2$ are prime and $a,b,n\in \Bbb N$?
 [/INST] Another solution: consider the powers of $3$$\pmod 8$. We have $3^1\equiv 3\pmod 8$ and $3^2\equiv 1\pmod 8$. So by induction it follows that $3^{2k+1}\equiv 3\pmod 8$ and $3^{2k}\equiv 1\pmod 8$, for $ k\in\Bbb {N} $. So $3^a+1$ would be  congruent with $4$ or $2$$\pmod 8$. Therefore we deduce that if $3^a+1=2^b $, then $ b\le 2$. 
If $ b=2$, then $ a=1$. 
If $ b=1$, then $ a=0$. Hence all the solutions are the pairs $(a, b)=(0,1), (1,2) $.
</s>