I've been working on a problem and could really use some help.
I'm trying to write the generating function for the number of ways to select n pastries from a bakery that has $10$ different types of pastry, if I must choose at least one and no more than $12$ of each type. My answer should be in closed form, and I don't need the series expansion.
I've tried splitting the problem up into two criteria: we need (1) at least one, and (2) no more than $12$. Then, combining the two functions through multiplication, if that makes sense.
For at least 1, I believe we should have:
$[x/(1-x)]^{10}$ as our generating function in closed form. I'm not sure if this is correct.
For no more than $12$, I'm really not sure what it should be, and could use some help.
You're very close. To incorporate (2), you need $$[x + x^2 + \cdots + x^{12}]^{10} = \left(\frac{x - x^{12}}{1 - x} \right)^{10}.$$