Problem statement:
Show that the number of r-combinations of specification $2^m1^{n-2m}$ is $$\sum_k {{m}\choose {k}}{{n-m-k}\choose{r-2k}}$$
I have found the generating function which is $(1+t+t^2)^m(1+t)^{n-2m}$, but I cannot proceed further to find the general coefficient.
I know the combinatorial proof for this question, I am specifically wanting to practice using generating functions. Any hint will also suffice.
I have tried using the geometric series formula and then Taylor expansion but could not proceed further.
Edit: The particular specification given here means there are objects of m kind with 2 of each kind and (n-2m) remaining objects that are distinct.
Best Answer
Here we use the coefficient of operator $[x^r]$ which denotes the coefficient of $x^r$ of a series. This way we can write for instance \begin{align*} \binom{n}{r}=[x^r](1+x)^n \end{align*}
Comment:
In (1) we apply the coefficient of operator.
In (2) we factor out terms independent of $k$ by using the linearity of the coefficient of operator and applying the rule $[x^{p-q}]A(x)=[x^p]x^qA(x)$.
In (3) we apply the binomial theorem.