New to generating functions - how do I get the function from the sequence defined by $a_n= n$ for $n\geqslant 0$?

72 Views Asked by At

I'm given: $a_n= n$ for $n \geqslant 0$.

I'm quite good at recursive generating functions, but I haven't came across a simpler one like this, so I'm sure I'm just overlooking something really basic.

2

There are 2 best solutions below

1
On

Wouldn't it be $A(x)=\sum_{i=1}^\infty ix^i$? To get this in a closed form, we have $A(x)=x\frac d{dx}\sum_{i=1}^\infty x^i=x\frac d{dx}\frac x{1-x}$

0
On

The generating function is, by definition $$ g(x) = \sum_{n=0}^\infty a_n x^n = \sum_{n=0}^\infty n x^n $$ The sum can be evaluated as follows: $$ g(x) = \sum_{n=0}^\infty n x^n = 0 + \sum_{n=1}^\infty n x^n \stackrel{n=m+1}{=} \sum_{m=0}^\infty (m+1) x^{m+1} = x \sum_{m=0}^\infty (m+1) x^{m} = x \left( \sum_{m=0}^\infty m x^{m} +\sum_{m=0}^\infty x^{m} \right) = x \left( g(x) + \frac{1}{1-x} \right) $$ Now solve for $g(x)$ to get $$ g(x) = \frac{x}{(1-x)^2} $$