OFFSET
1,30
COMMENTS
A necklace is a finite sequence that is minimal among its cyclic permutations.
a(1) = 1 by convention.
EXAMPLE
The a(144) = 3 necklace permutations of {1,1,1,1,2,2} are: (111122), (111212), (112112).
MATHEMATICA
primeMS[n_]:=If[n==1, {}, Flatten[Cases[FactorInteger[n], {p_, k_}:>Table[PrimePi[p], {k}]]]];
neckQ[q_]:=Array[OrderedQ[{q, RotateRight[q, #]}]&, Length[q]-1, 1, And];
Table[Length[Select[Permutations[primeMS[n]], neckQ]], {n, 2, 200}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 04 2018
STATUS
approved