OFFSET
1,4
COMMENTS
A necklace composition of n is a finite sequence of positive integers summing to n that is lexicographically minimal among all of its cyclic rotations.
FORMULA
a(n) = 2^(n-1) - A008965(n).
EXAMPLE
The a(3) = 1 through a(6) = 19 compositions:
(21) (31) (32) (42)
(121) (41) (51)
(211) (131) (141)
(212) (213)
(221) (231)
(311) (312)
(1121) (321)
(1211) (411)
(2111) (1131)
(1221)
(1311)
(2112)
(2121)
(2211)
(3111)
(11121)
(11211)
(12111)
(21111)
MATHEMATICA
neckQ[q_]:=Array[OrderedQ[{q, RotateRight[q, #]}]&, Length[q]-1, 1, And];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], !neckQ[#]&]], {n, 10}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 10 2019
STATUS
approved