Find the recurrence relation solution. $a_n$ = $a_{n-1} + 3n - 5$ $a_n$ = $a_{n-1} + 3n - 5$ $,$ $a_0 = 7$
So far what I got is:
$a_0 = 7$
$a_1 = 7+3(1)-5$
$a_2 = 7+3(1)-5 + 3(2)-5$
$a_3 = 7+3(1)-5 + 3(2)-5 + 3(3)-5$
$a_4 = 7+3(1)-5 + 3(2)-5 + 3(3)-5 + 3(4)-5$
This is where I'm stuck I'm having trouble finding a pattern to the relation.
At first I tried solving this as a quadratic sequence and got $a_n = \frac{3}{2}{n^2} - \frac{7}2n + 7$  which works but on a test I solved a recurrence relation problem as a quadratic sequence got the right answer but got a 0 on the problem because the professor wanted us to use forward or backward substitution which is what I am attempting above (forward substitution).
 A: By telescoping sum, $a_n-7=a_n-a_0=\sum\limits_{k=1}^n(a_k-a_{k-1})=\sum\limits_{k=1}^n(3k-5)=3\sum\limits_{k=1}^n k-\sum\limits_{k=1}^n 5=3\frac{n(n+1)}2-5n$
A: Let $A(z) = \sum_{n=0}^\infty a_nz^n$. Multiply both sides of the recurrence by $z^n$ and sum over $n$ to obtain
$$
\sum_{n=1}^\infty a_nz^n = \sum_{n=1}^\infty a_{n-1}z^n + \sum_{n=1}^\infty 3nz^n - \sum_{n=1}^\infty 5z^n.
$$
By some algebra we obtain
$$
A(z) - a_0 = zA(z) +\sum_{n=0}^\infty 3nz^n - \sum_{n=1}^\infty 5z^n.
$$
From the identity $\sum_{n=0}^\infty z^n = \frac1{1-z}$ and differentiating we obtain
$$
\sum_{n=0}^\infty 3nz^n - \sum_{n=1}^\infty 5z^n= \frac{3 z}{(1-z)^2}  -\frac{5 z}{1-z},
$$
so we have
$$
A(z) - 7 = zA(z) +\frac{3z}{(1-z)^2} - \frac{5z}{1-z}.
$$
Solving for $A(z)$ yields
$$
A(z) = \frac{12 z^2-16 z+7}{(1-z)^3}.
$$
After a partial fraction decomposition, we have
$$
A(z) = -\frac{8}{(1-z)^2}+\frac{3}{(1-z)^3}+\frac{12}{1-z}.
$$
Writing the terms on the right-hand side as series yields
\begin{align}
A(z) &= \sum_{n=0}^\infty -8(n+1)z^n + \sum_{n=0}^\infty \frac32(n+1)(n+2)z^n + \sum_{n=0}^\infty 12z^n\\
&= \sum_{n=0}^\infty  \left(\frac{1}{2} n (3 n-7)+7\right) z^n.
\end{align}
It follows then that
$$
a_n = \frac{1}{2} n (3 n-7)+7.
$$
A: Observe that $$a_n - a_0 = \sum\limits_{k=1}^n (a_k - a _{k-1}) = 3 \sum\limits_{k=1}^{n} k - 5 n.$$
