This was also posted in math.stackexchange. However, I have no idea how difficult it is. All hints or references are appreciated! Consider a set $S$ of $n$ red balls and $m$ blue balls. It is well known that the number of partitions of this set is the Bell number $B_{n+m}$. We say that a partition $P \subset \mathcal{P}(S)$ of $S$ is *good* if it has the following property: If there are at least two red (blue) balls in $A \in P$, there also is at least one blue (red) ball in $A$. Let $\xi_{n+m} \leq B_{n+m}$ be the number of good partitions of $S$. Is there a chance for obtaining a closed form for the number $\xi_{n+m}$? Alternatively, is it possible to construct an algorithm to calculate it for large $n$ and $m$? What happens if we introduce other colors and alter the definition of a good partition: We say that a partition $P \subset \mathcal{P}(S)$ of $S$ is *good* if it has the following property: If there are at least two balls of the same color in $A \in P$, there also is at least one ball in $A$ with a different color. EDIT: In a related post, http://math.stackexchange.com/questions/289016/partitions-and-bell-numbers, they find an expression for partitions of an $n$-element set with no singletons. I'm not sure, however, if this problem can be solved as an application of that.