Use the generating function to solve a recurrence relation We have the recurrence relation $\displaystyle a_n  = a_{n-1} + 2(n-1)$ for $n \geq 2$, with $a_1 = 2$.
Now I have to show that $\displaystyle a_n = n^2 - n +2$, with $n \geq 1$ using the generating function. 
The theory in my book is scanty, so with the help of the internet I have the following:
$\displaystyle \sum_{n = 2} ^\infty (a_n  - a_{n-1}) x^n = \sum_{n = 2} ^\infty a_n x^n - \sum_{n = 2} ^\infty a_{n-1} x^n = \sum_{n = 2} ^\infty a_n x^n - x \sum_{n = 2} ^\infty a_{n-1} x^{n-1} = (a(x) - a_1 x) - x(a(x)) = (a(x) - 2 x) - x(a(x)) = a(x) (1-x) - 2x$
But how I have to work out $\displaystyle \sum_{n = 2} ^\infty 2(n-1) x^n$ ? 
If I have this, an expression for $a(x)$ can be found. How should $a_n$ be found from $a(x)$?

another observation is :$$a_n=a_{n-1}+2(n-1) ,\space \space \space a_1=2$$ $$\rightarrow a_n-a_{n-1}=2(n-1)\\$$ put $n=1,2,3,..(n-1)$ $$a_2-a_1=2(2-1
)=2(1)\\ a_3-a_2=2(3-1)=2(2)\\a_4-a_3=2(4-1)=2(3)\\...\\a_n-a_{n-1}=2(n-1)=2(n-1)\\$$no look at sum of them  $$a_n-a_1=2(1)+2(2)+2(3)+...2(n-1)=\\2(1+2+3+4+...+(n-1))=2 \frac{(n-1)(n-1+1)}{2} \\so\\a_n-2=2\frac{n^2-n}{2}\\a_n=n^2-n+2$$
