cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A325788 Number of complete strict necklace compositions of n.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 2, 0, 0, 4, 4, 4, 4, 0, 20, 6, 16, 12, 10, 0, 84, 40, 74, 42, 66, 38, 22, 254, 238, 188, 356, 242, 272, 150, 148, 1140, 1058, 1208, 1546, 1288
Offset: 1

Views

Author

Gus Wiseman, May 22 2019

Keywords

Comments

A strict necklace composition of n is a finite sequence of distinct positive integers summing to n that is lexicographically minimal among all of its cyclic rotations. In other words, it is a strict composition of n starting with its least part (counted by A032153). A circular subsequence is a sequence of consecutive terms where the last and first 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.

Examples

			The a(1) = 1 through a(16) = 6 complete strict necklace compositions (empty columns not shown):
  (1)  (12)  (123)  (124)  (1234)  (1253)  (1245)  (1264)  (12345)  (12634)
             (132)  (142)  (1324)  (1325)  (1326)  (1327)  (12354)  (13624)
                           (1423)  (1352)  (1542)  (1462)  (12435)  (14263)
                           (1432)  (1523)  (1623)  (1723)  (12453)  (14326)
                                                           (12543)  (14362)
                                                           (13254)  (16234)
                                                           (13425)
                                                           (13452)
                                                           (13524)
                                                           (13542)
                                                           (14235)
                                                           (14253)
                                                           (14325)
                                                           (14523)
                                                           (14532)
                                                           (15234)
                                                           (15243)
                                                           (15324)
                                                           (15342)
                                                           (15432)
		

Crossrefs

Programs

  • 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/@Select[IntegerPartitions[n],UnsameQ@@#&],neckQ[#]&&Union[Total/@subalt[#]]==Range[n]&]],{n,30}]