Suppose, I have a generating function:
G(z) = Σ tnzn
and an equation as:
tn=tn-1+(n-1)
I rewrite it in terms of G(z) as:
Σ tnzn = Σ tn-1 zn + Σ n . zn - Σ zn
Σ tnzn = z Σ tn zn + Σ n . zn - Σ zn
G(z) = z G(z) + $\frac{n}{(1-z)}- \frac{1}{(1-z)}$
Is the last step valid?
Thanks.
So, I tackled this question in the following manner.
Given $G(z)=\sum_{n=0}^\infty t_nz^n$
and the equation $t_n=t_{n-1}+(n-1)$
$\sum_{n=0}^\infty t_nz^n=\sum_{n=0}^\infty t_{n-1}z^n+\sum_{n=0}^\infty (n-1)z^n$
$\sum_{n=0}^\infty t_nz^n=z\sum_{n=0}^\infty t_{n}z^n+{z^2\over(1-z)^2}$
$G(z)=zG(z)+{z^2\over(1-z)^2}$
$G(z)-zG(z)={z^2\over(1-z)^2}$
$G(z)(1-z)={z^2\over(1-z)^2}$
$G(z)={z^2\over(1-z)^3}$
$G(z)=z^2\sum_{n=0}^\infty {n(n-1)\over2}z^{n}$
$\therefore t_n={n(n-1)\over2}$
Thanks for all the help!