Find the Generating Function from the sequence (0,1,0,3,0,5,...) Find the Generating Function from the sequence (0,1,0,3,0,5,...)


I can't conceptualize this one and I know it should be easy because it is just odds, but I am having a hard time figuring out how to cancel the even terms.

I was thinking like k$x^k$ but that doesn't cancel the evens.  

Any help would be much appreciated.
$G(x)=x+3x^3+5x^5+...=x(1+3x^2+5x^4+...)= xF'(x),$
where $$F(x)=x+x^3+x^5+...=\frac{x}{1-x^2}$$
I'm sure you can finish from here.
The answer is simple.
Just iterate for x = 0 to Infinite
And the xth term is

f(x) = (x%2)*x


Where % is modulus operator which returns the remainder of the two operands

Here x%2 cancels out all the even terms leaving all the odd terms behind