# Combinatorics: Balls and boxes

I can't solve this combinatorics problem.

How many ways can you distribute 23 blue numbered balls and 7 green indistinguishable balls in 12 numbered boxes so that there is at most 1 green ball in each box and the first box is not empty.

Thank you very much!

If the first box contains a green ball then first choose the boxes containing the green balls, as they are indistinguishable there are $\binom{11}{6}$ choices, as the first ball already has a ball. Now each of the 23 blue balls can be put in any of the boxes, so there are $\binom{11}{6} \cdot 12^{23}$ configurations.
Now if the first box doesn't contain a green ball similarly there are $\binom{11}{7}$ ways to choose the boxes containin the green balls and $12^{23}$ ways to distribute the blue balls. But note it's possible for the first boxes to be empty, so we have to subtract the "bad" configurations. There are exactly $\binom{11}{7} \cdot 11^{23}$ such configurations and finally the wanted number is:
$$\binom{11}{6} \cdot 12^{23} + \binom{11}{7} \cdot 12^{23} - \binom{11}{7} \cdot 11^{23}$$