I have a pattern, which goes: $x_n =2(x_{n-1}-x_{n-2})+x_{n-1}$ and this pattern holds for all $n \ge 2$. I also know that $x_0 = 1 \ and \ x_1 = 5.$
$x_2 = 2(x_1-x_0)+x_1$
$\begin{align} x_3 = 2(x_2-x_1) + x_2 &= 2(2(x_1-x_0)+x_1)+x_2\\ &=2^2x_1-2^2x_0+2x_ 1+x_2 \end{align}$
$\begin{align} x_4 = 2(x_3-x_2)+x_3 &= 2(2^2x_1-2^2x_0+2x_1+x_2-(2(x_1-x_0)+x_1)+x_2)+x_3 \\ &=2^3x_1-2^3x_0+2^2x_1+2x_2-(2x_1-2x_0+x_1)+x_2)+x_3 \\ &=2^3x_1-2^3x_0+2^2x_1+2x_2 - 2x_1 +2x_0-x_1+x_2+x_3 \\ &=2^2x_1-2^2x_0+2x_1+2^2x_2+x_3 \end{align}$
(The formula below is no longer valid, I noticed since last edit) $[x_n = 2^{n-1}(x_1-x_0) + \sum^{n-1}_{i=0}(2^{n-2-i}x_i)]$
Well, here I'm confused; there's no pattern to be found anymore, or am I just blind?
Let's write the formula as $x_n = 3x_{n-1} - 2x_{n-2}$.
This is a linear homogeneous recurrence relation with constant coefficients.
The characteristic equation is $\lambda^2 - 3\lambda + 2 = 0$, i.e. $(\lambda-2)(\lambda-1) = 0$.
The roots are $\lambda_1 = 2$ and $\lambda_2 = 1$, so the general solution is $x_n = C_1\lambda_1^n + C_2\lambda_2^n = C_1 \cdot 2^n + C_2$.
Using the initial conditions $x_0 = 1$ and $x_1 = 5$, we get:
$x_0 = C_1+C_2 = 1$
$x_1 = 2C_1+C_2 = 5$
Solving gives us $C_1 = 4$ and $C_2 = -3$.
Therefore, the specific solution (based on the initial conditions) is $x_n = 4\cdot 2^n - 3$.