4

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.

C.Math
  • 689

3 Answers3

10

$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.

saulspatz
  • 53,131
2

\begin{eqnarray*} \sum_{i=0}^{\infty} (2i+1)x^{2i+1} =\frac{x}{1-x^2}+\frac{2x^3}{(1-x^2)^2} = \frac{x+x^3}{(1-x^2)^2}. \end{eqnarray*}

Donald Splutterwit
  • 36,613
  • 2
  • 26
  • 73
-2

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

Jagreet
  • 17