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 subsequence is a sequence of consecutive terms where the first and last parts are also considered consecutive. A necklace composition of n is complete if every positive integer from 1 to n is the sum of some circular subsequence.
EXAMPLE
The a(1) = 1 through a(8) = 19 necklace compositions:
(1) (11) (12) (112) (113) (123) (124) (1124)
(111) (1111) (122) (132) (142) (1133)
(1112) (1113) (1114) (1142)
(11111) (1122) (1123) (1214)
(1212) (1132) (1223)
(11112) (1213) (1322)
(111111) (1222) (11114)
(11113) (11123)
(11122) (11132)
(11212) (11213)
(111112) (11222)
(1111111) (11312)
(12122)
(111113)
(111122)
(111212)
(112112)
(1111112)
(11111111)
MATHEMATICA
neckQ[q_]:=Array[OrderedQ[{q, RotateRight[q, #]}]&, Length[q]-1, 1, And];
subalt[q_]:=Union[ReplaceList[q, {___, s__, ___}:>{s}], DeleteCases[ReplaceList[q, {t___, __, u___}:>{u, t}], {}]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], neckQ[#]&&Union[Total/@subalt[#]]==Range[n]&]], {n, 15}]
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, May 22 2019
STATUS
approved