If we have a recursion relation defined as $a_n = 3a_{n-1}+1$ with $a_1=1$ then find the general formula for $a_n$ in terms of $n$ with a(1) = 1.
So far I have:
$a_n = 3a_{n-2}+1+1 = 3a_{n-3}+1+1+1 = 3a_{n-4}+1+1+1+1$
I'm unsure of where to go from here to find the solution.
Note that $$a_{n}+\frac 12=3\left(a_{n-1}+\frac 12\right).$$ So, letting $b_n=a_n+1/2$, we get $$b_n=3b_{n-1}.$$ Since $b_1=a_1+1/2=3/2$, we have $$b_n=\frac 32\cdot 3^{n-1}=\frac{3^n}{2}.$$ Hence, we have $$a_n=\frac{3^n}{2}-\frac 12=\frac{3^n-1}{2}.$$