Circular permutations with indistinguishable objects
Given n distinct objects, there are $n!$ permutations of the objects and $n!/n$ "circular permutations" of the objects (orientation of the circle matters, but there is no starting point, so $1234$ and $2341$ are the same, but $4321$ is different).
Given $n$ objects of $k$ types (where the objects within each type are indistinguishable), $r_i$ of the $i^{th}$ type, there are
\begin{equation*} \frac{n!}{r_1!r_2!\cdots r_k!} \end{equation*}
permutations. How many circular permutations are there of such a set?
Solution 1:
I wrote a series of blog posts which explains how to solve questions like this; the relevant one is here. The generating function you want is
$$\frac{1}{n} \sum_{d | n} (x_1^{n/d} + ... + x_k^{n/d})^d \varphi \left( \frac{n}{d} \right)$$
where the coefficient of $x_1^{r_1} ... x_k^{r_k}$ is the number you want.
Solution 2:
This problem is best solved with Pólya's enumeration theorem, which follows from Burnside's lemma. See the first section of this Wikipedia article.