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

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

A325552 Number of compositions of n with distinct differences up to sign.

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 12, 23, 38, 61, 78, 135, 194, 315, 454, 699, 982, 1495, 2102, 3085, 4406, 6583, 9048, 13117, 18540, 26399, 36484, 51885, 72498, 100031, 139342, 192621, 267068, 367631, 505954, 687153, 946412, 1283367, 1745974, 2356935, 3207554, 4311591, 5816404
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 differences of a sequence are defined as if the sequence were increasing, so for example the differences of (3,1,2) are (-2,1).
a(n) has the same parity as n for n > 0, since reversing a composition does not change whether or not it has this property, and the only valid symmetric compositions are (n) and (n/2,n/2), with the latter only existing for even n. - Charlie Neder, Jun 06 2019

Examples

			The differences of (1,2,1) are (1,-1), which are different but not up to sign, so (1,2,1) is not counted under a(4).
The a(1) = 1 through a(7) = 23 compositions:
  (1)  (2)   (3)   (4)    (5)    (6)    (7)
       (11)  (12)  (13)   (14)   (15)   (16)
             (21)  (22)   (23)   (24)   (25)
                   (31)   (32)   (33)   (34)
                   (112)  (41)   (42)   (43)
                   (211)  (113)  (51)   (52)
                          (122)  (114)  (61)
                          (221)  (132)  (115)
                          (311)  (213)  (124)
                                 (231)  (133)
                                 (312)  (142)
                                 (411)  (214)
                                        (223)
                                        (241)
                                        (322)
                                        (331)
                                        (412)
                                        (421)
                                        (511)
                                        (1132)
                                        (2113)
                                        (2311)
                                        (3112)
		

Crossrefs

Programs

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

Extensions

a(26)-a(42) from Alois P. Heinz, Jan 27 2024

A325591 Number of compositions of n with circular differences all equal to 1, 0, or -1.

Original entry on oeis.org

1, 2, 4, 6, 11, 15, 27, 43, 68, 116, 189, 311, 519, 860, 1433, 2380, 3968, 6613, 11018, 18374, 30633, 51089, 85208, 142113, 237055, 395409, 659576, 1100262, 1835382, 3061711, 5107445, 8520122, 14213135, 23710173, 39553138, 65982316, 110071459, 183620990, 306316328
Offset: 1

Views

Author

Gus Wiseman, May 12 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(6) = 15 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)
       (11)  (12)   (22)    (23)     (33)
             (21)   (112)   (32)     (222)
             (111)  (121)   (122)    (1122)
                    (211)   (212)    (1212)
                    (1111)  (221)    (1221)
                            (1112)   (2112)
                            (1121)   (2121)
                            (1211)   (2211)
                            (2111)   (11112)
                            (11111)  (11121)
                                     (11211)
                                     (12111)
                                     (21111)
                                     (111111)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],SameQ[1,##]&@@Abs[DeleteCases[Differences[Append[#,First[#]]],0]]&]],{n,15}]
  • PARI
    step(R,n,D)={matrix(n, n, i, j, if(i>j, sum(k=1, #D, my(s=D[k]); if(j>s && j+s<=n, R[i-j, j-s]))) )}
    a(n)={sum(k=1, n, my(R=matrix(n,n,i,j,i==j&&abs(i-k)<=1), t=0); while(R, t+=R[n,k]; R=step(R,n,[0,1,-1])); t)} \\ Andrew Howroyd, Aug 23 2019

Formula

a(n) ~ c * d^n, where d = 1.66820206701846111636107... (see A034297), c = 0.65837031047271348106444... - Vaclav Kotesovec, Sep 21 2019

Extensions

Terms a(21) and beyond from Andrew Howroyd, Aug 23 2019
Showing 1-5 of 5 results.