Doubts on the workings of generating functions? I'm reading Martin's: The art of enumerative combinatorics. 



With: 

$\quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad  $

There are two things that are misterious to me:


*

*Why the process of converting $(1+z+z^2+\cdots )^5$ to $\displaystyle \left[ \frac{(1-z^{11})}{(1-z)} \right]$ to  $\displaystyle [1-z^{11}]^5  \left[\frac{1}{1-z}  \right]^5$ works when we take all the coefficients $a_n,a_m$ such that $m+n=40$? This is probably the best I can explain my doubt, but it still seems a little bit misterious to me. 

*I don't understand why:
$\quad \quad \quad \quad \quad \quad $
It should be the sum of four terms, but here there are only 3 terms. I know he might have rewritten it in another way, I just can't see which way is that.
 A: Ad 1: Expanding $(1+z+\ldots+z^{10})^5$ requires the multinomial formula, with a mess of terms over which we have no overview. But $(1-z^{11})^5$ and $(1-z)^{-1}$ can be tackled with the binomial formula (a simple sum each), and it remains to pair the  terms whose exponents add up to $40$.
Ad 2: It's a typo. He meant $$-{5\choose 1}\left\langle\matrix{5\cr 29\cr}\right\rangle+{5\choose 2}\left\langle\matrix{5\cr 18\cr}\right\rangle\ .$$
A: (1) We write $\left(\sum_{k=0}^{10} z^k\right)^5$ as $\sum_{k=0}^\infty a_k z^k$ and want to compute the $a_k$. We do as follows
\begin{align*}
  \sum_{k=0}^\infty a_k z^k &= 
  \left(\sum_{k=0}^{10} z^k\right)^5\\ &= \frac{1}{(1-z)^5} \cdot (1- z^{11})^5\\
    &= \sum_{j = 0}^\infty \left<{5\atop j}\right> z^j \cdot \sum_{i=0}^5 (-1)^i \binom 5i z^{11i} \\
    &=: \sum_{j=0}^\infty b_j z^j \cdot \sum_{j=0}^\infty c_j z^j\\
    &= \sum_{k=0}^\infty \sum_{n+m = k} b_n c_m \cdot z^k 
\end{align*}
Hence (as the coefficients of a power series are uniquely determined) we must have 
$$ a_k = \sum_{n+m = k} b_n c_m $$
for all $k$, especially for $k = 40$, that gives 
$$ a_{40} = \sum_{n+m = 40} b_n c_m $$
Now $c_m = 0$ for $m \not\in \{0, 11, 22, 33, 44, 55\}$, hence 
$$ a_{40} = b_{40}c_0 + b_{29}c_{11} + b_{18}c_{22} + b_{7}c_{33} $$
(2) That's a typo, there is a "$-$" missing.
