Let $r_1,\dots,r_m\in\mathbb{N}$ and let $n=\sum_{i=1}^{m}r_i$. Moreover, let
$$R_i=\mathbb{N}\cap \left(\sum_{j=1}^{i-1}r_i,\; \sum_{j=1}^{i}r_j\right]$$
(this can be thought of as grouping the integers in $\{1,\dots, n\}$, i.e. the first $r_1$ integers are in $R_1$, the next $r_2$ are in $R_2$, etc...). How many partitions $\pi$ of $\{1,2,\dots, n\}$ are there such that
$$|\pi|=\ell$$
and letting $\pi=\{B_1,\dots, B_\ell\}$ (under some indexing) we have
$$|B_{i}\cap R_j|=t_{i,j}$$
for all $1\le i\le \ell$, $1\le j\le m$ for fixed $t_{i,j}$. That is to say we have a priori decided how many integers from each group the cells of the partition must have.
I tried to look at it a bit like a ball and urn situation, where the integers in each $R_i$ are balls of different colors, the $B_j$ are the urns, and then via the constraints count all possible ways to construct the $B_j$'s (i.e. fill the urns) to produce the $\pi$'s. However, this gets slightly weird seeing as once we place the $B_j$'s into a set to form $\pi$ their indexing become irrelevant leading to double counting.
Side Note: This comes from trying to rewrite/simply an application of the multivariate form of Faa di Bruno's formula.
2026-05-06 10:41:41.1778064101