Solving Recurrence Relation by Generating Function Method Im trying to solve 
an-7a(n-1)+10a(n-2)
Im at the point where ∈aX^n-7∈a(n-1)X^n+10∈a(n-2)x^n=0
(terms of n are subscript)
After this step it is given as replace the infinite sum by an expression from table of eq. expressions 
and it becomes(Summation from 2 to infinity) 
(A(X)-a0-a1X)-7X∈a(n-1)X^N-1+10x^2∈an-2x^n-2=0
I want to know and from where these are substituted? 
I find it really hard to type the maths equations.So im attaching a picture.Please help


 A: I'm guessing your recurrence is: $a_n -7a_{n-1} +10a_{n-2}=0 \longleftrightarrow a_n = 7a_{n-1}-10a_{n-2} \longleftrightarrow a_{n+2} = 7a_{n+1} -10a_n  $.  Let's say $a_0=0$, $a_1=1$ for sake of example. 
Set $F(x) = a_0 + a_1x + a_2x^2+\ldots  = \sum_{n=0}^{\infty} a_nx^n $ 
So $\frac{F(x) - a_0}{x} = a_1 + a_2x + a_3x^2+\ldots =\sum_{n=0}^{\infty} a_{n+1}x^n$
$\frac{F(x)-a_0-a_1}{x^2}=a_2+a_3x+a_4x^2+\ldots=\sum_{n=0}^{\infty}a_{n+2}x^n$
We have: 
$$
\sum_{n=0}^{\infty}a_{n+2}x^n= 7 \sum_{n=0}^{\infty} a_{n+1}x^n-10\sum_{n=0}^{\infty} a_nx^n
$$
Therefore:
$$
\frac{F(x)-a_0-a_1}{x^2}=7\left(\frac{F(x) - a_0}{x}\right)-10F(x) \longleftrightarrow
$$
$$
F(x)=\frac{(1-7x)a_0+a_1}{1-7x+10x^2}
$$
Using partial fractions, one obtains:
$$
F(x)=\frac{(2 a_0-5 a_1)}{3 (5 x-1)}+\frac{(2 a_1-5a_0)}{3 (2 x-1)}
$$
Expand the two terms into power series:
$$
F(x) = \frac{5a_1-2a_0}{3}\sum_{n=0}^{\infty} 5^nx^n + \frac{5a_0-2a_1}{3}\sum_{n=0}^{\infty} 2^nx^n
$$
So,
$$
a_{n+1} = \left(\frac{5a_1-2a_0}{3}5^n+\frac{5a_0-2a_1}{3}2^n\right)
$$
For example, in our case of $a_0 = 0, a_1=1$, 
$$
a_{n+1} = \left(\frac{5}{3}5^n-\frac{2}{3}2^n\right)=\frac{5^{n+1}-2^{n+1}}{3}
$$
This is correct, as $a_2 = 7$, $a_3 = 7\cdot 7 - 10 = 39$. Verifying our formula in terms of $n$, we have:
$$
a_2 = \frac{5^2-2^2}{3} = \frac{21}{3}, a_3 = \frac{5^3-2^3}{3}=39, \text{etc..}
$$
