In combinatorial mathematics, the necklace polynomial, or Moreau's necklace-counting function, introduced by C. Moreau (1872), counts the number of distinct necklaces of n colored beads chosen out of k available colors, arranged in a cycle. Unlike the usual problem of graph coloring, the necklaces are assumed to be aperiodic (not composed from a repeated subsequence), and counted up to rotation (rotating the beads around the necklace counts as the same necklace), but without flipping over (reversing the order of the beads counts as a different necklace). This counting function also describes the dimensions in a free Lie algebra and the number of irreducible polynomials over a finite field.
Definition The necklace polynomials are a family of polynomials Mn(k) in the variable k such that
kn = ∑d|ndMd(k). By Möbius inversion they are given by
Mn(k) = 1n∑d|nμ(nd)kd, where μ is the classic Möbius function. A closely related family, called the general necklace polynomial or general necklace-counting function, is:
Nn(k) = ∑d|nMd(k) = 1n∑d|nφ(nd)kd, where φ is Euler's totient function.
Applications The necklace polynomials Mn(k) appear as:
The number of aperiodic necklaces (or equivalently Lyndon words), which are cyclic arrangements of n colored beads having k available colors. Two such necklaces are considered equal if they are related by a rotation (not considering reflections). Aperiodic refers to necklaces without rotational symmetry, having n distinct rotations. Correspondingly, Nn(k) gives the number of necklaces including the periodic ones: this is easily computed using Pólya theory. The dimension of the degree n component of the free Lie algebra on k generators ("Witt's formula"), or equivalently the number of Hall words of length n. Correspondingly, Nn(k) should be the dimension of the degree n component of a free Jordan algebra. The number of monic irreducible polynomials of degree n over a finite field with k elements (when k=pd is a prime power). Correspondingly, Nn(k) is the number of polynomials which are primary (a power of an irreducible). The exponent in the cyclotomic identity: 11−kz = ∏j=1∞(11−zj)Mj(k). Although these various types of objects are all counted by the same polynomial, their precise relationships remain unclear. For example, there is no canonical bijection between the irreducible polynomials and the Lyndon words. However, there is a non-canonical bijection as follows. For any degree n monic irreducible polynomial over a field F with k=pd elements, its roots lie in a Galois extension field L with kn elements. One may choose an element x∈L such that {x,σx,...,σn−1x} is an F-basis for L (a normal basis), where σ is the Frobenius automorphism σy=yk. Then the bijection can be defined by taking a necklace, viewed as an equivalence class of functions f:{1,...,n}→F, to the irreducible polynomialφ(T)=(T−y)(T−σy)⋯(T−σn−1y)∈F[T] for y=f(1)x+f(2)σx+⋯+f(n)σn−1x.Different cyclic rearrangements of f, i.e. different representatives of the same necklace equivalence class, yield cyclic rearrangements of the factors of φ(T), so this correspondence is well-defined.
Relations between M and N The polynomials for Mn and Nn are easily related in terms of Dirichlet convolution of arithmetic functions (f∗g)(n)=∑d∣nf(n/d)g(d), regarding k as a constant.
The formula for Mn gives nMn=μ(n)∗kn, The formula for Nn gives nNn=φ(n)∗kn=n∗μ(n)∗kn. Their relation gives Nn=1∗Mn or equivalently nNn=n∗(nMn), since the function f(n)=n is completely multiplicative. Any two of these imply the third, for example:
n∗μ(n)∗kn=nNn=n∗(nMn)⟹μ(n)∗kn=nMn by cancellation in the Dirichlet algebra.
Examples Mn(1)=0 if n>1M1(k)=kM2(k)=12(k2−k)M3(k)=13(k3−k)M4(k)=14(k4−k2)M5(k)=15(k5−k)M6(k)=16(k6−k3−k2+k)Mp(k)=1p(kp−k) if p is primeMpN(k)=1pN(kpN−kpN−1) if p is prime For k=2, starting with length zero, these form the integer sequence
1, 2, 1, 2, 3, 6, 9, 18, 30, 56, 99, 186, 335, ... (sequence A001037 in the OEIS)
Identities
The polynomials obey various combinatorial identities, given by Metropolis & Rota:
Mn(kℓ,n)=∑lcm(i,j)=ngcd(i,j)Mi(k)Mj(ℓ), where "gcd" is greatest common divisor and "lcm" is least common multiple. More generally,
Mn(kℓ⋯m)=∑lcm(i,j,…,r)=ngcd(i,j,…,r)Mi(k)Mj(ℓ)⋯Mr(m), which also implies:
Mn(km)=∑lcm(j,m)=nmjnMj(k).
References
Moreau, C. (1872), "Sur les permutations circulaires distinctes (On distinct circular permutations)", Nouvelles Annales de Mathématiques, Série 2 (in French), 11: 309–31, JFM 04.0086.01 Metropolis, N.; Rota, Gian-Carlo (1983), "Witt vectors and the algebra of necklaces", Advances in Mathematics, 50 (2): 95–125, doi:10.1016/0001-8708(83)90035-X, ISSN 0001-8708, MR 0723197, Zbl 0545.05009 Reutenauer, Christophe (1988). "Mots circulaires et polynomies irreductibles". Ann. Sc. Math. Quebec. 12 (2): 275–285.