Solve the recurrence relation $a(n) = 7a(n-1) - 10a(n-2)$
Not really sure where to start. I see that I can generalize it a bit to be
$$ a(n) = 7(7(a(n-1) - 10 a(n-2) - 10 ( 7(a(n-3)) - 10 (a(n-4))) $$
Solve the recurrence relation $a(n) = 7a(n-1) - 10a(n-2)$
Not really sure where to start. I see that I can generalize it a bit to be
$$ a(n) = 7(7(a(n-1) - 10 a(n-2) - 10 ( 7(a(n-3)) - 10 (a(n-4))) $$
Here is a possible tack. Assume that $a_n = \lambda^n$ for all $n$. Can you find values of $\lambda$ that work? You should also note that this recurrence is linear.
The characteristic polynomial is $x^2 - 7x + 10 = 0$, which has roots $x=2$ and $x=5$.
Therefore the recurrence will have solution $a(n) = \alpha \cdot 2^n + \beta \cdot 5^n$, where these multipliers will change depending on your initial conditions, e.g. the values of $a(0)$ and $a(1)$.
Hint: It is related to the characteristic equation $x^2-7x+10=0$.
We may also let $b(n)=a(n)-2a(n-1)$
Then we have
\begin{align*} a(n)-2a(n-1)&=5a(n-1)-10a(n-2)\\ b(n)&=5b(n-1) \end{align*}
The recurrence relation $b(n)=5b(n-1)$ is easier to solve. The solution is $b(n)=5^{n-1}b(1)$.
So we have $a(n)-2a(n-1)=5^{n-1}b(1)$, which is equivalent to
$$\frac{a(n)}{2^n}-\frac{a(n-1)}{2^{n-1}}=\frac{b(1)}{2}\left(\frac{5}{2}\right)^{n-1}$$
Not difficult to solve.
The sequence of the generalized Fibonacci type, for which I have presented a detailed account in Find an explicit expression for the general term of a recurrence relation. There I show that the solution for a sequence of the type $f_n=af_{n-1}+bf_{n-2}$ with initial conditions $f(0)=f_0 \ \&\ f(1)=f_1$ is given by
$$f_n=\left(f_1-\frac{af_0}{2}\right) \frac{\alpha^n-\beta^n}{\alpha-\beta}+\frac{f_0}{2} (\alpha^n+\beta^n)$$
where $\alpha,\beta=(a\pm\sqrt{a^2+4b})/2$.
In your case, $\alpha,\beta=(7\pm\sqrt{49-40})/2=2,5$, so finally
$$a_n=-\left(a_1-\frac{7a_0}{2}\right) \frac{2^n-5^n}{3}+\frac{a_0}{2} (2^n+5^n)$$