Generating function with quadratic coefficients. $h_k=2k^2+2k+1$. I need the generating function $$G(x)=h_0+h_1x+\dots+h_kx^k+\dots$$ I do not have to simplify this, yet I'd really like to know how Wolfram computed this sum as $$\frac{x(2x^2-2x+5}{(1-x)^3}$$ when $|x|<1$. Rewrite Wolfram's answer as $$x(2x^2-2x+5)(1+x+x^2+\dots)^3=x(2x^2-5x+2)(1+2x+3x^2+\dots)(1+x+x^2+\dots),$$ but how would this give $G$?

$$\sum_{k=0}^{\infty} x^k = \frac{1}{1-x}$$
$$\sum_{k=0}^{\infty}k x^k = \frac{x}{(1-x)^2}$$
$$\sum_{k=0}^{\infty}k^2 x^k = \frac{x(1+x)}{(1-x)^3}$$
$$G(x) = \sum_{k=0}^{\infty} (2 k^2+2 k+1) x^k$$
Combine the above expressions as defined by $G(x)$ and you should reproduce Wolfram.
