let generating function of given recurrence equation is $G.$
$a_1=8 \implies a_0 = 0 $ ( by substituting in the given equation )
$a_{n} = a_{n-1}+ 2n \;+\;6n^{2} $
$\sum_{n=1}^{\infty}\;a_{n}.x^{n} = \sum_{n=1}^{\infty}\;a_{n-1}.x^{n} + 2\; \sum_{n=1}^{\infty}\;n.x^{n} \;+\;6\;\sum_{n=1}^{\infty}\;n^{2} .x^{n} $
$G-a_{0} = x.\sum_{n=1}^{\infty}\;a_{n-1}.x^{n-1} + 2\; \sum_{n=1}^{\infty}\;n.x^{n} \;+\;6\;\sum_{n=1}^{\infty}\;n^{2} .x^{n} $
$G = x.G+ 2\;\dfrac{x}{(1-x)^{2}}\;+\;6\; \dfrac{x\;(1+x)}{(1-x)^{3}}\;$
$G-x.G = 2\;\dfrac{x\;(1-x)}{(1-x)^{3}}\;+\;6\; \dfrac{x\;(1+x)}{(1-x)^{3}}\; = \;\dfrac{8x+4x^2}{(1-x)^{3}}\; $
$G.(1-x) = \;\dfrac{8x+4x^2}{(1-x)^{3}}\; $
$G= \;\dfrac{8x+4x^2}{(1-x)^{4}}\; = (8x+4x^2).(1-x)^{-4} $
value of $a_{99}$ is coefficient of $x^{99}$ in the above generating function.
coefficient of $x^{99}$ in $ (8x+4x^2).(1-x)^{-4}$ = $\underset{first\; term}{\underbrace{8\times\binom{-4}{98}}}+\underset{second\;term}{\underbrace{4\times\binom{-4}{97}}} =8\times\binom{101}{3} + 4\times\binom{100}{3} = 1980000$
How $\sum_{n=1}^{\infty}\;n.x^{n} \text{ is equal to the generating function }\;\dfrac{x}{(1-x)^{2}} ?$
$\sum_{n=1}^{\infty}\;n.x^{n} = 1.x^{1} + 2.x^{2}+ 3.x^{3}+\dots = 0 + 1.x^{1} + 2.x^{2}+ 3.x^{3}+\dots$
$\therefore \;\;generating \;\;seq. < 0,1,2,3,4,5,6,\dots>$
we know that, $\dfrac{1}{(1-x)} = 1+x^{1} + x^{2}+ x^{3}+\dots$
apply derivative both sides,
$\dfrac{1}{(1-x)^{2}} = 1+2.x^{1} + 3.x^{2}+ 4.x^{3}+\dots$
$\therefore \;\;generating \;\;seq. < 1,2,3,4,5,6,\dots>$
multiply both sides with x, then
$\dfrac{x}{(1-x)^{2}} = 0+1.x^{1} + 2.x^{2}+ 3.x^{3}+\dots$
$\therefore \;\;generating \;\;seq. < 0,1,2,3,4,5,6,\dots>$
How $\sum_{n=1}^{inf}\;n^{2}.x^{n} \text{ is equal to the generating function }\;\dfrac{x(1+x)}{(1-x)^{3}} ?$
$\sum_{n=1}^{\infty}\;n^{2}.x^{n} = 1.x^{1} + 4.x^{2}+ 9.x^{3}+\dots = 0 + 1.x^{1} + 4.x^{2}+ 9.x^{3}+\dots$
$\therefore \;\;generating \;\;seq. < 0,1,4,9,16,\dots>$
we know that, $\dfrac{1}{(1-x)} = 1+x^{1} + x^{2}+ x^{3}+\dots$
apply derivative both sides,
$\dfrac{1}{(1-x)^{2}} = 1+2.x^{1} + 3.x^{2}+ 4.x^{3}+\dots$
$\therefore \;\;generating \;\;seq. < 1,2,3,4,5,6,\dots>$
Multiply both sides with $x,$ then
$\dfrac{x}{(1-x)^{2}} = 0+1.x^{1} + 2.x^{2}+ 3.x^{3}+\dots$
$\therefore \;\;generating \;\;seq. < 0,1,2,3,4,5,6,\dots>$
Apply derivative both sides,
$LHS = \dfrac{d}{dx}\left(\dfrac{x}{(1-x)^{2}}\right) = \dfrac{1+x}{(1-x)^{3}}$
$RHS = 1+4.x^{1} + 9.x^{2}+ 16.x^{3}+\dots$
$\therefore \;\;generating \;\;seq. < 1,4,9,16,\dots>$
Multiply both sides with $x,$ then
$\dfrac{x(1+x)}{(1-x)^{3}} = 0+1.x^{1} + 4.x^{2}+ 9.x^{3}+\dots$
$\therefore \;\;generating \;\;seq. < 0,1,4,9,16,\dots>$
a Good Pdf to read : ( credits : @Lakshman Patel RJIT )
https://gateoverflow.in/?qa=blob&qa_blobid=9100126224883486314