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.

A325556 Number of necklace compositions of n with distinct circular differences up to sign.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 7, 9, 13, 25, 27, 51, 63, 95, 123, 179, 205, 305, 409, 559, 715, 1009, 1337, 1869
Offset: 1

Views

Author

Gus Wiseman, May 11 2019

Keywords

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.
The circular differences of a composition c of length k are c_{i + 1} - c_i for i < k and c_1 - c_i for i = k. For example, the circular differences of (1,2,1,3) are (1,-1,2,-2).

Examples

			The a(1) = 1 through a(10) = 13 necklace compositions:
  (1)  (2)  (3)  (4)  (5)  (6)  (7)    (8)     (9)     (A)
                                (124)  (125)   (126)   (127)
                                (142)  (134)   (162)   (136)
                                       (143)   (1125)  (145)
                                       (152)   (1134)  (154)
                                       (1124)  (1143)  (163)
                                       (1142)  (1152)  (172)
                                               (1224)  (235)
                                               (1422)  (253)
                                                       (1126)
                                                       (1162)
                                                       (1225)
                                                       (1522)
		

Crossrefs

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@Abs[Differences[Append[#,First[#]]]]&&neckQ[#]&]],{n,15}]