Find a generating function for the sequence ($c_n$), where $c_r$ = $\sum_{i=0}^r i2^i$ with r $\in$ $\mathbb Z^+$

294 Views Asked by At

Q: Find the generating function for the sequence ($c_r$), where $c_r$ = $\sum_{i=0}^r i2^i$ with r $\in$ $\mathbb Z^+$. Hence show that $\sum_{i=0}^r i2^i = 2 + (r-1)2^{r+1}$.

A: $\frac{2x}{(1-2x)^2(1-x)}$ (Proof not given in the solutions)

I have no idea as to how the answer to this question is derived, in particular, finding the generating function.

1

There are 1 best solutions below

2
On BEST ANSWER

The power series for your generating function is

$$\sum_{n\ge 0}c_nx^n=\sum_{n\ge 0}\sum_{k=0}^nk2^kx^n\;.$$

The trick is to reverse the order of summation and then simplify:

$$\begin{align*} \sum_{n\ge 0}\sum_{k=0}^nk2^kx^n&=\sum_{k\ge 0}\sum_{n\ge k}k2^kx^n\\ &=\sum_{k\ge 0}k2^k\sum_{n\ge k}x^n\\ &=\sum_{k\ge 0}k2^k\cdot\frac{x^k}{1-x}\\ &=\frac1{1-x}\sum_{k\ge 0}k(2x)^k\\ &=\frac{2x}{1-x}\sum_{k\ge 0}k(2x)^{k-1}\\ &=\frac{x}{1-x}\cdot\frac{d}{dx}\left(\sum_{k\ge 0}(2x)^k\right)\\ &=\frac{x}{1-x}\cdot\frac{d}{dx}\left(\frac1{1-2x}\right)\\ &=\frac{2x}{(1-x)(1-2x)^2} \end{align*}$$

Thus, the generating function is

$$g(x)=\frac{2x}{(1-x)(1-2x)^2}\;.$$

Decompose into partial fractions, convert each partial fraction to a power series, and read off the coefficient of $x^n$ to get your closed form for $c_n$.