# How to find its closed-form?

here is a sequence defined by the below recursion formula: $$a_n=2a_{n-1}+a_{n-2}$$ where $n \in \mathbb{N}$ and $a_0=1,a_1=2$.how to find its closed-form.

-
There are a couple of standard approaches. Have you used generating functions? –  André Nicolas Dec 9 '12 at 17:37

If we write $E^ra_n=a_{n+r},$

the characteristic/auxiliary equation becomes $E^2-2E-1=0,E=1\pm\sqrt2$

So, the complementary function $a_n=A(1+\sqrt2)^n+B(1-\sqrt2)^n$ where $A,B$ are indeterminate constants to be determined from the initial condition.

$a_0=A+B,$ But $a_0=1$ So, $A+B=1$

and $a_1=A(1+\sqrt2)+B(1-\sqrt2)=2$

Now, solve for $A,B$

-

To put it simple: Use a power trial function $a_n=q^n$ to find a solution disregarding the initial conditions (there will be two solutions $q_1$ and $q_2$ that can work). Next make a linear combination $Aq_1^n+Bq_2^n$ to match the initial conditions. Note that a linear combination is automatically also a solution.

-