# Explicit (General) formula for recursive definition.

I am given $a_n=3a_{n-1}+4^n$, $n=1,2,3,....$ and $a_0=1$.

First four terms:

\begin{align} a_1&=3.1+4^1=3+4=7\\ a_2&=3.7 + 4^2 = 21 + 16 = 37 \\ a_3&=3.37 + 4^3 = 111 + 64 = 175\\ a_4&=3.175 + 4^4 = 525 + 256 = 781 \end{align}

Can any one help me to find a general formula for this recursive definition? It's not a homework. I am studying for the upcoming final exam..

We can rewrite this as $a_{n+1} - 3a_{n} = 4^{n+1}$ valid for $n\ge 0$. This method is similar to solving a constant coefficient differential equation. The characteristic polynomial for the corresponding homogenous recurrence relation is $$E - 3 = 0.$$ So $a_n^c =c_13^n$ for some constant $c_1$. Now assume $a_n^p =A\cdot4^{n+1}.$ Then $a_{n+1}^p = 4A\cdot4^{n+1}$. Now we have $$4A\cdot4^{n+1} - 3A\cdot4^{n+1} =4^{n+1}\implies A = 1$$ Now $a_n$ is just the sum of the complementary solution and the particular solution. Hence, $$a_n = c_1 3^n + 4^{n+1}.$$ We can solve for $c_1$ using the initial condition.