Ordinary power series generating function of $\{(-1)^nn^2\}^\infty_{n=0}$ Calculate the ordinary power series generating function of the sequence $\{(-1)^nn^2\}^\infty_{n=0}$.
Is $\sum^\infty_{n=0}(-1)^nx^n$ the opsgf of $\{(-1)^n\}^\infty_{n=0}$? And if so, what fraction is it equal to?
Once I know that opsgf of $\{(-1)^n\}^\infty_{n=0}$ I can use $\{na_n\}^\infty_{n=0} = xf'(x)$, where $f(x)$ is the opsgf of $\{a_n\}^\infty_{n=0}$.
 A: The ordinary generating function $\displaystyle{\sum_{n=0}^\infty (-1)^nx^n}$ is simply $\dfrac{1}{1+x}$ because $$\sum_{n=0}^\infty (-1)^nx^n=\sum_{n=0}^\infty(-x)^n=\frac{1}{1-(-x)}=\frac{1}{1+x}.$$ You can use the same sort of idea to obtain $\sum_{n=0}^\infty(-1)^nn^2 x^n$. 
First, write $F(x)=\dfrac{1}{1-x}$. Then $$F'(x)=\frac{d}{dx}\sum_{n=0}^\infty x^n=\sum_{n=0}^\infty nx^{n-1}=\sum_{n=0}^\infty (n+1)x^n,$$ and $$F''(x)=\frac{d^2}{dx^2}\sum_{n=0}^\infty x^n=\sum_{n=0}^\infty n(n-1)x^{n-2}=\sum_{n=0}^\infty (n+2)(n+1)x^n$$ $$=\sum_{n=0}^\infty n^2x^n+3\sum_{n=0}^\infty (n+1)x^n-\sum_{n=0}^\infty x^n=\sum_{n=0}^\infty n^2x^n+3F'(x)-F(x).$$ This shows that $$\sum_{n=0}^\infty n^2x^n=F''(x)-3F'(x)+F(x),$$ and you can calculate that this is $\dfrac{x^2+x}{(1-x)^3}$. Finally, $$\sum_{n=0}^\infty (-1)^nn^2x^n=\sum_{n=0}^\infty n^2(-x)^n=\frac{(-x)^2+(-x)}{(1-(-x))^3}=\frac{x^2-x}{(1+x)^3}.$$
Remark: For any positive integer $k$, the generating function $\displaystyle{\sum_{n=0}^\infty n^kx^n}$ is given by $\dfrac{A_k(x)}{(1-x)^{k+1}}$, where $A_k(x)$ is called an Eulerian polynoimal. The Eulerian polynomial $A_2(x)$ is just $x^2+x$, which is indeed the numerator in the generating function for $\sum_{n=0}^\infty n^2x^n$.
A: Since the opsgf of a sequence $\{a_n\}_{n=0}^{\infty}$ is
\begin{align*}
\sum_{n=0}^{\infty}a_nx^n
\end{align*}
your assumption about $\{(-1)^n\}_{n=0}^{\infty}$ is correct.

Hint: Consider the geometric series $\frac{1}{1+x}$

