I suspect that the answer to my question might be trivially found in the Wikipedia page for the combinatorial concept of a necklace, but I'm finding that page very hard to understand.
Suppose I have $N$ beads in $k$ available colors, where I've fixed the number of beads of each color. That is, I specify a particular $k$-tuple of nonnegative integers $(n_1, n_2, \dots, n_k)$ such that $\sum \limits_{i=1}^k n_i = N$, where $n_i$ ($i = 1, \dots, k$) is the number of beads of the $i$th color. Then how many (fixed) necklaces can be made from these beads? I.e. how many length-$n$ strings are there over an alphabet of size $k$ if we fix the total number of appearances of each character in the alphabet and we identify strings that are related by circular shifts?
If I understand the Wikipedia article correctly, the first equation gives the total number of necklaces if we only fix the number $k$ of available colors, but sum over all possible specific $k$-tuples that represent a particular partition of the beads into the different colors. But what if we know the exact partition? I don't understand the second equation on the Wikipedia page, because I don't understand what they mean by a "necklace of length $n$ with exactly $k$ different colored beads", or how this is different from the situation that the previous equation considers.
(If it makes things easier, you can feel free to assume that the $n_i$ are all positive rather than nonnegative, so that $k$ represents the number of colors that actually appear rather than the number of colors that are available. This changes the number of valid $k$-tuples, but I don't think it really matters much if we're specifying a particular $k$-tuple.)
$ with $n_1 + n_2 + n_3 + n_4 = N.$ Further suppose that you start with the simple problem of how many ways of arranging the items in a row. The enumeration is $$\binom{N}{n_1} \times \binom{N - n_1}{n_2} \times \binom{N - n_1 - n_2}{n_3} .$$ ...see next comment – user2661923 Nov 30 '21 at 04:38