<s>[INST] Find the nth term of a recursive sequence I have a the following sequence:
$$\begin{gather}
a_1 = 3 \\
a_{n + 1} = 1 + \frac{a_n}{2}
\end{gather}
$$
How can I find the $a_n$ term? 
 [/INST] Note that $$\begin{align}a_{n+1} &=1+\frac{a_n}{2} =1+\frac{1}{2}(1+\frac{a_{n-1}}{2})\\ &=1+\frac{1}{2}+\frac{1}{2^2}a_{n-1} \\ &=1+\frac{1}{2}+\frac{1}{2^2}+\frac{1}{2^3}a_{n-2}\\ &  \vdots \\ &= 1+\frac{1}{2}+\frac{1}{2^2}+ \dots+\frac{1}{2^{n-1}}+\frac{1}{2^n}a_1 \\ &=1+\frac{1}{2}+\frac{1}{2^2}+ \dots+\frac{1}{2^{n-1}}+\frac{3}{2^n}\end{align}$$
</s>