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.

Showing 1-7 of 7 results.

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

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 7, 21, 31, 41, 87, 99, 191, 245, 381, 501, 735, 883, 1309, 1841, 2589, 3435, 4941, 6857, 9791, 13503, 19475, 27073, 37175, 52299, 72249, 100359, 139317, 190549, 256769, 355193, 471963, 644433, 858793, 1159161, 1530879, 2056073, 2711921
Offset: 0

Views

Author

Gus Wiseman, May 11 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
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(8) = 21 compositions:
  (1)  (2)  (3)  (4)  (5)  (6)  (7)    (8)
                                (124)  (125)
                                (142)  (134)
                                (214)  (143)
                                (241)  (152)
                                (412)  (215)
                                (421)  (251)
                                       (314)
                                       (341)
                                       (413)
                                       (431)
                                       (512)
                                       (521)
                                       (1124)
                                       (1142)
                                       (1241)
                                       (1421)
                                       (2114)
                                       (2411)
                                       (4112)
                                       (4211)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@Abs[Differences[Append[#,First[#]]]]&]],{n,20}]

Extensions

a(0) and a(26)-a(43) from Alois P. Heinz, Jan 28 2024

A325551 Number of compositions of n with distinct circular differences.

Original entry on oeis.org

1, 1, 3, 6, 11, 8, 26, 50, 79, 121, 195, 265, 478, 742, 1269, 1914, 2929, 4462, 6825, 10309, 16324, 24633, 37213, 56828, 84482
Offset: 1

Views

Author

Gus Wiseman, May 10 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
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), which are distinct, so (1,2,1,3) is counted under a(7).

Examples

			The a(1) = 1 through a(7) = 26 compositions:
  (1)  (2)  (3)   (4)    (5)    (6)    (7)
            (12)  (13)   (14)   (15)   (16)
            (21)  (31)   (23)   (24)   (25)
                  (112)  (32)   (42)   (34)
                  (121)  (41)   (51)   (43)
                  (211)  (113)  (114)  (52)
                         (122)  (141)  (61)
                         (131)  (411)  (115)
                         (212)         (124)
                         (221)         (133)
                         (311)         (142)
                                       (151)
                                       (214)
                                       (223)
                                       (232)
                                       (241)
                                       (313)
                                       (322)
                                       (331)
                                       (412)
                                       (421)
                                       (511)
                                       (1213)
                                       (1312)
                                       (2131)
                                       (3121)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],UnsameQ@@Differences[Append[#,First[#]]]&]],{n,15}]

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}]

A325786 Number of complete necklace compositions of n.

Original entry on oeis.org

1, 1, 2, 2, 4, 7, 12, 19, 41, 71, 141, 255, 509, 924, 1882, 3395, 6838, 12715, 25233, 47049
Offset: 1

Views

Author

Gus Wiseman, May 22 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. 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.

Examples

			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)
		

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

A325554 Number of necklace compositions of n with distinct differences.

Original entry on oeis.org

1, 2, 2, 4, 5, 6, 11, 18, 26, 38, 60, 90, 139, 213, 329, 501, 747, 1144, 1712, 2548, 3836, 5732, 8442, 12654, 18624
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 differences of a sequence are defined as if the sequence were increasing, so for example the differences of (3,1,2) are (-2,1).

Examples

			The a(1) = 1 through a(8) = 18 necklace compositions:
  (1)  (2)   (3)   (4)    (5)    (6)    (7)     (8)
       (11)  (12)  (13)   (14)   (15)   (16)    (17)
                   (22)   (23)   (24)   (25)    (26)
                   (112)  (113)  (33)   (34)    (35)
                          (122)  (114)  (115)   (44)
                                 (132)  (124)   (116)
                                        (133)   (125)
                                        (142)   (134)
                                        (223)   (143)
                                        (1132)  (152)
                                        (1213)  (224)
                                                (233)
                                                (1124)
                                                (1142)
                                                (1214)
                                                (1322)
                                                (11213)
                                                (11312)
		

Crossrefs

Programs

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

A325588 Number of necklace compositions of n with equal circular differences up to sign.

Original entry on oeis.org

1, 2, 3, 4, 4, 7, 5, 9, 8, 10, 8, 17, 9, 14, 15, 22, 12, 23, 14, 31, 23, 25, 19, 48, 25, 35, 36, 56, 33, 59, 43, 86, 64, 74, 76, 136, 95, 127, 138, 219, 178, 245, 249, 372, 370, 445, 506, 747, 730, 907, 1069, 1431, 1544, 1927, 2268, 2981, 3332, 4074, 4896, 6320
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 sequence 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(8) = 9 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (12)   (13)    (14)     (15)      (16)       (17)
             (111)  (22)    (23)     (24)      (25)       (26)
                    (1111)  (11111)  (33)      (34)       (35)
                                     (222)     (1111111)  (44)
                                     (1212)               (1232)
                                     (111111)             (1313)
                                                          (2222)
                                                          (11111111)
		

Crossrefs

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],neckQ[#]&&SameQ@@Abs[Differences[Append[#,First[#]]]]&]],{n,15}]
  • PARI
    step(R,n,s)={matrix(n, n, i, j, if(i>j, if(j>s, R[i-j, j-s]) + if(j+s<=n, R[i-j, j+s])) )}
    w(n,s)={sum(k=1, n, my(R=matrix(n,n,i,j,i==j&&abs(i-k)==s), t=0, m=1); while(R, R=step(R,n,s); m++; t+=sumdiv(n, d, R[d,k]*d*eulerphi(n/d))/m ); t/n)}
    a(n) = {numdiv(max(1,n)) + sum(s=1, n-1, w(n,s))} \\ Andrew Howroyd, Aug 24 2019

Extensions

Terms a(26) and beyond from Andrew Howroyd, Aug 24 2019

A325550 Number of necklace compositions of n with distinct multiplicities.

Original entry on oeis.org

1, 2, 2, 4, 5, 7, 11, 16, 18, 41, 86, 118, 273, 465, 731, 1432, 2791, 4063, 8429, 14761, 29465, 58654, 123799, 227419, 453229, 861909, 1697645, 3192807, 6315007, 11718879, 22795272, 42965245, 83615516, 156215020, 306561088, 587300503, 1140650287, 2203107028
Offset: 1

Views

Author

Gus Wiseman, May 10 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.

Examples

			The a(1) = 1 through a(8) = 16 necklace compositions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (113)    (33)      (115)      (44)
                    (112)   (122)    (114)     (133)      (116)
                    (1111)  (1112)   (222)     (223)      (224)
                            (11111)  (1113)    (1114)     (233)
                                     (11112)   (1222)     (1115)
                                     (111111)  (11113)    (2222)
                                               (11122)    (11114)
                                               (11212)    (11222)
                                               (111112)   (12122)
                                               (1111111)  (111113)
                                                          (111122)
                                                          (111212)
                                                          (112112)
                                                          (1111112)
                                                          (11111111)
		

Crossrefs

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],neckQ[#]&&UnsameQ@@Length/@Split[Sort[#]]&]],{n,15}]
  • PARI
    b(n)={((r,k,b,w)->if(!k||!r, if(r,0,(w-1)!), sum(m=0, r\k, if(!m || !bittest(b,m), self()(r-k*m, k-1, bitor(b,1<Andrew Howroyd, Aug 31 2019

Formula

a(n) = Sum_{d|n} phi(d)*(Sum_{k=1..n/d} A242887(n/d, k)/k)/d. - Andrew Howroyd, Aug 31 2019

Extensions

Terms a(26) and beyond from Andrew Howroyd, Aug 31 2019
Showing 1-7 of 7 results.