<s>[INST] Find 'ordinary generating function': 1, 0, 2, 0, 3, 0, 4, 0, 5.... This was on my midterm yesterday, but I couldn't solve it. 

Find an ordinary generating function:  1, 0, 2, 0, 3, 0, 4, 0, 5....

My answer was $(\frac{1}{1-x^2})^2$ because 1, 2, 3, 4, 5, 6, 7, ... is $\frac{1}{1-x^2}$. (now I feel like it just doesn't make sense). 
Can you find the ordinary generating function?
 [/INST] 
We   obtain
  \begin{align*}
\color{blue}{1+2x^2+3x^4+\cdots}&=\sum_{n=0}^\infty (n+1)x^{2n}\\
&=\frac{1}{2x}\frac{d}{dx}\left(\sum_{n=0}^\infty \left(x^2\right)^{n+1}\right)\\
&=\frac{1}{2x}\frac{d}{dx}\left(\sum_{n=1}^\infty \left(x^2\right)^n\right)\\
&=\frac{1}{2x}\frac{d}{dx}\left(\frac{1}{1-x^2}-1\right)\\
&\,\,\color{blue}{=\frac{1}{(1-x^2)^2}}
\end{align*}

</s>