For the following two sequences: (1) $\{(k+1)(k+2)\}$, (2) $\{\frac{k(k-1)}{2}\}$, I am trying to obtain the generating functions for both of them. I am going through a text finite difference equations and method of generating functions is extremely short.
I know that both of sequences are related to the sequence $y_k = k(k+1)$, and it's generating function is $\frac{2s}{(1-s)^3}$. For (1) If I let $Y(s)=y_k$, then shouldn't the generating function for $(k+1)(k+2)$ be $\frac{Y(s)-y_0}{s} = \frac{{\frac{2s}{(1-s)^3}}-1}{s} = \frac{2}{(1-s)^3} - \frac{1}{s}$. However the solution is $\frac{2}{(1-s)^3}$. I am not sure what I am doing wrong.
For (2) $\{\frac{k(k-1)}{2}\}$, I am not sure how to relate it back to the the sequence $k(k+1)$ but the solution of its generating function is $\frac{s^2}{(1-s)^3}$
Thank you in advance
For the first one notice that you do not have to take out the constant term because there is no constant term. $k(k+1)$ evaluated at $k=0$ is $0.$
For the second one notice that if you have $$F=\sum _{k=0}^{\infty}y_kx^k,$$ then $$xF=\sum _{k=0}^{\infty}y_kx^{k+1}=\sum _{k=1}^{\infty}y_{k-1}x^k,$$ so if $$\frac{2s}{(1-s)^3}=\sum _{k=0}^{\infty}k(k+1)s^k,$$ then $$s\frac{2s}{(1-s)^3}=\sum _{k=0}^{\infty}(k\color{red}{-1})(k+1\color{red}{-1})s^k,$$ divide by $2$ and you are done.