OFFSET
1,3
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.
A circular subinterval is a sequence of consecutive indices where the first and last indices are also considered consecutive.
EXAMPLE
The a(1) = 1 through a(10) = 9 necklace compositions (A = 10):
(1) (2) (3) (4) (5) (6) (7) (8) (9) (A)
(12) (13) (14) (15) (16) (17) (18) (19)
(23) (24) (25) (26) (27) (28)
(34) (35) (36) (37)
(124) (125) (45) (46)
(142) (152) (126) (127)
(135) (136)
(153) (163)
(162) (172)
(234)
(243)
MATHEMATICA
neckQ[q_]:=Array[OrderedQ[{q, RotateRight[q, #]}]&, Length[q]-1, 1, And];
suball[q_]:=Join[Take[q, #]&/@Select[Tuples[Range[Length[q]], 2], OrderedQ], Drop[q, #]&/@Select[Tuples[Range[2, Length[q]-1], 2], OrderedQ]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], neckQ[#]&&UnsameQ@@Total/@suball[#]&]], {n, 15}]
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, May 13 2019
STATUS
approved