Let me first give a few examples:
How many ways are there to select 25 toys from 7 types with between 2 to 6 of each type.
How many ways can we distribute 25 identical balls to 7 boxes where the first box can have at most 10 balls.
There seems to be a method to solve this sort of question using generating functions. The set up for the second question is as follows: $(1+t+...+t^{10})(1+t+...) = \frac{1}{(1-t)^7} - \frac{t^4}{(1-t)^7}$ and from here I get confused as to how we obtain our answer.
I would love some clarification on this concept and some help to finish the example started above!
Thank you! :)
SeriesCoefficient[(1+x+x^2+x^3+...)^6 * (1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8+x^9+x^10),[x,0,25]. If I didn't misunderstand you, I went through the same question (the coding) here. +1 to WaveX. – Antoni Parellada Feb 22 '18 at 21:23