Problem
COM-B2-M09-P009 Five Boxes with an Upper Bound
#9
★★★☆☆ Level 3 of 5
In how many ways can \(20\) identical tokens be distributed among \(5\) boxes if each box may contain at most \(6\) tokens?
The desired number is the coefficient of \(x^{20}\) in \((1+x+\cdots+x^6)^5\).
Without restrictions, there are \(\binom{24}{4}=10626\) solutions. If one box contains at least \(7\), subtracting \(7\) leaves sum \(13\), giving \(\binom{17}{4}=2380\) solutions; there are \(5\) boxes. If two boxes contain at least \(7\), the remaining sum is \(6\), giving \(\binom{10}{4}=210\) solutions; there are \(\binom{5}{2}=10\) pairs. Three such boxes are impossible. The answer is \(10626-5\cdot 2380+10\cdot 210=826\).
A standard olympiad problem on a coefficient of a finite power.