Statement
Using beads of colors we form strings of exactly beads; there are possible strings. We discard the monochromatic strings and join the rest into loops: rotating a string yields strings giving the same necklace. How many distinct (non-monochromatic) necklaces can be formed?
Solution
Total strings: . The monochromatic ones number (one per color), leaving non-monochromatic strings. Since is prime, each necklace corresponds to exactly strings (its rotations), all distinct. Hence (This is the combinatorial idea behind Fermat’s little theorem: .)