Solution 2.4.5.1.

Again, we iterate the recurrence relation, building up to the index \(n\text{.}\)

\begin{align*} a_1 \amp = 3a_0 + 2\\ a_2 \amp = 3(a_1) + 2 = 3(3a_0 + 2) + 2\\ a_3 \amp = 3[a_2] + 2 = 3[3(3a_0 + 2) + 2] + 2\\ \vdots \amp \qquad \vdots \qquad \qquad \vdots\\ a_n \amp = 3(a_{n-1}) + 2 = 3(3(3(3\cdots(3a_0 + 2) + 2) + 2)\cdots + 2)+ 2\text{.} \end{align*}

It is difficult to see what is happening here because we have to distribute all those 3's. Let's try again, this time simplifying a bit as we go.

\begin{align*} a_1 \amp = 3a_0 + 2\\ a_2 \amp = 3(a_1) + 2 = 3(3a_0 + 2) + 2 = 3^2a_0 + 2\cdot 3 + 2\\ a_3 \amp = 3[a_2] + 2 = 3[3^2a_0 + 2\cdot 3 + 2] + 2 = 3^3 a_0 + 2 \cdot 3^2 + 2 \cdot 3 + 2\\ \vdots \amp \qquad\quad \vdots \hspace{2in} \vdots\\ a_n \amp = 3(a_{n-1}) + 2 = 3(3^{n-1}a_0 + 2 \cdot 3^{n-2} + \cdots +2)+ 2\\ \amp \qquad \qquad = 3^n a_0 + 2\cdot 3^{n-1} + 2 \cdot 3^{n-2} + \cdots + 2\cdot 3 + 2\text{.} \end{align*}

Now we simplify. \(a_0 = 1\text{,}\) so we have \(3^n + \langle\text{stuff}\rangle\text{.}\) Note that all the other terms have a 2 in them. In fact, we have a geometric sum with first term \(2\) and common ratio \(3\text{.}\) We have seen how to simplify \(2 + 2\cdot 3 + 2 \cdot 3^2 + \cdots + 2\cdot 3^{n-1}\text{.}\) We get \(\frac{2-2\cdot 3^n}{-2}\) which simplifies to \(3^n - 1\text{.}\) Putting this together with the first \(3^n\) term gives our closed formula:

\begin{equation*} a_n = 2\cdot 3^n - 1\text{.} \end{equation*}
in-context