number of maps from [n] to [6], if there are conditions on at least how many elements must have each image?

38 Views Asked by At

For example, how many maps $f: [n] \to [6]$ are there, if at least one element must have image $2$ and at least $4$ different elements must have image $5$?

or in general: at least $a_i$ distinct elements must map to $i$ for $i = 1, ..., 6$

This could be done with the principle of inclusion and exclusion, but I need it for a computer programme, which already runs for too long, so I'm looking for an explicit formula, or something that's not a very long sum, if that's possible.

This is the same as the number of partitions of $[n]$ into $6$ parts, so I was thinking if it could be done with Stirling numbers, but I don't know how.

I was also thinking if I could do it with exponential generating functions, since we would get $\prod_{i=1}^6 (e^{x} - \frac{x^{a_i - 1}}{(a_i - 1)!} - \frac{x^{a_i - 2}}{(a_i - 2)!} - ... - 1)$, but I can't find an explicit formula.