Suppose we have $b$ identical blue balls and $r$ identical red balls. How many ways are there to arrange them in a circle?


Clearly, if we wanted to arrange the balls in a row, the answer would have been $\binom{b+r}{b}$. However, I cannot see a simple way to count the number of arrangements in a circle.



Arranging blue and red balls in a circle
I doubt there is a really simple answer, but a straightforward application of [Burnside's Counting Theorem](https://en.wikipedia.org/wiki/Burnside%27s_lemma) says the number is
 $$ \frac{1}{b + r} \sum\_{d \mid \gcd(b,r)} \phi(d) \binom{(b + r)/d}{b/d} .$$
where $\phi$ is the Euler totient function. Problems like this are exercises in many combinatorics textbooks. If $\gcd(b,r) = 1$, then the answer is easy: $\frac{1}{b+r} \binom{b+r}{b}$.


