0

The generating function for compositions of $n$ with $k$ parts so that each part is even is $(t^2/(1-t^2))^k$. Is the generating function for the compositions with an odd number of parts each of which is even just $(t^2+t^4+t^6+\dots)^{2k+1}$?

RobPratt
  • 45,619

1 Answers1

1

You have the right idea, but $2k+1$ is only one odd number, so sum over all odd numbers: \begin{align} \sum_{k=0}^\infty \left(\frac{t^2}{1-t^2}\right)^{2k+1} &= \frac{t^2}{1-t^2} \sum_{k=0}^\infty \left(\frac{t^4}{(1-t^2)^2}\right)^k \\ &= \frac{t^2}{1-t^2} \cdot \frac{1}{1-t^4/(1-t^2)^2} \\ &= \frac{t^2(1-t^2)}{(1-t^2)^2-t^4} \\ &= \frac{t^2-t^4}{1-2t^2} \\ \end{align}

RobPratt
  • 45,619