[Math] Finding general formula for a recursion function

recurrence-relationsrecursionsequences-and-series

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.

Best Answer

Let's prove by induction that:

$$a_n = \frac{3^n-1}{2}$$

For $n = 1$, we have $\frac{3^1-1}{2} = 1 = a_1$. So that's good so far.

Assume our formula holds for $1\leq k \leq n$. Then:

$$a_{n+1} = 3a_n + 1 = 3\frac{3^n-1}{2} + 1 = \frac{3^{n+1}-3+2}{2} = \frac{3^{n+1}-1}{2}$$

Wich is what we wanted to prove.

($a_n = 1 + 3 + 9 + \ldots + 3^{n-1}$. This is called geometric series. You can find quite a lot of info about it).

Related Question