# Generating function

1. Dec 22, 2011

### Emilijo

What is generating function of these sequences:
0,1,0,1...or
0,1,1,0,1,1,0...or
0,1,1,1,0,1,1,1,0...

where m is period, in first example m=2; in the second m=3, and so on.
Generating function must be general, so I can just put m.

2. Dec 22, 2011

### epsi00

https://oeis.org/

if they are known, they will be listed.

3. Dec 23, 2011

### Emilijo

I am not satisfied. Can anyone answer on my question?

4. Dec 23, 2011

### micromass

So you need to find a function such that

$$f(x)=1+x^2+x^4+x^6+x^8+...$$

Do you know the function g such that

$$g(x)=1+x+x^2+x^3+x^4+x^5+...$$

Then $f(x)=g(x^2)$...

5. Dec 23, 2011

### fbs7

The other ones should be the same way, right? Like

$$f(x) = x + x^2 + x^4 + x^5 + x^7 + x^8 + ... = (1 + x + x^2 + x^3 + x^4 + ... ) - (1 + x^3 + x^6 + x^9 + ...) = g(x) - g(x^3)$$

6. Dec 23, 2011

### micromass

Indeed!! That how I'd do the other ones!!

7. Dec 23, 2011

### fbs7

You're a great mentor! I had never heard of generating functions until I came to this post, but your post got me curious to go find the mechanics around that.

Learning a new thing every day. Thank you! :D

8. Dec 23, 2011

### micromass

If you're really interested then I can recommend the book "Concrete Mathematics" by Knuth. The book gives several mathematical tools to solve problems that sound easy but whose solutions are far from it!! Generating functions is one of those tools.

9. Dec 24, 2011

### Xitami

wee ned a proof for$$\overbrace{\,0,\,1,...\,1}^m\quad\frac{\sum_{i=1}^{m-1}x^i}{1\,-\,x^m}$$