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-4 of 4 results.

A325545 Number of compositions of n with distinct differences.

Original entry on oeis.org

1, 1, 2, 3, 7, 13, 17, 34, 59, 105, 166, 279, 442, 730, 1157, 1927, 3045, 4741, 7527, 11667, 18048, 27928, 43334, 65861, 101385, 153404, 232287, 347643, 523721, 780083, 1165331, 1725966, 2561625, 3773838, 5561577, 8151209, 11920717, 17364461, 25269939, 36635775
Offset: 0

Views

Author

Gus Wiseman, May 10 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
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(6) = 17 compositions:
  (1)  (2)   (3)   (4)    (5)     (6)
       (11)  (12)  (13)   (14)    (15)
             (21)  (22)   (23)    (24)
                   (31)   (32)    (33)
                   (112)  (41)    (42)
                   (121)  (113)   (51)
                   (211)  (122)   (114)
                          (131)   (132)
                          (212)   (141)
                          (221)   (213)
                          (311)   (231)
                          (1121)  (312)
                          (1211)  (411)
                                  (1131)
                                  (1221)
                                  (1311)
                                  (2112)
		

Crossrefs

Programs

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

Extensions

More terms from Alois P. Heinz, May 11 2019

A325549 Number of necklace compositions of n with distinct circular differences.

Original entry on oeis.org

1, 1, 2, 3, 5, 4, 10, 16, 23, 34, 53, 66, 113, 164, 262, 380, 567, 821, 1217, 1778, 2702, 3919, 5760, 8520, 12375
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.
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) = 16 necklace compositions:
  (1)  (2)  (3)   (4)    (5)    (6)    (7)     (8)
            (12)  (13)   (14)   (15)   (16)    (17)
                  (112)  (23)   (24)   (25)    (26)
                         (113)  (114)  (34)    (35)
                         (122)         (115)   (116)
                                       (124)   (125)
                                       (133)   (134)
                                       (142)   (143)
                                       (223)   (152)
                                       (1213)  (224)
                                               (233)
                                               (1124)
                                               (1142)
                                               (1214)
                                               (11213)
                                               (11312)
		

Crossrefs

Programs

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

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

Original entry on oeis.org

1, 2, 2, 4, 5, 6, 10, 15, 19, 24, 39, 49, 78, 106, 155, 207, 313, 430, 608, 867, 1239, 1670, 2313, 3220, 4483
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) = 15 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)
                                                (224)
                                                (233)
                                                (1124)
                                                (1142)
                                                (1322)
		

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[#]]&&neckQ[#]&]],{n,15}]

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-4 of 4 results.