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.

A329766 Number of compositions of n whose run-lengths cover an initial interval of positive integers.

Original entry on oeis.org

1, 1, 1, 3, 6, 13, 21, 48, 89, 180, 355, 707, 1382, 2758, 5448, 10786, 21391, 42476, 84291, 167516, 333036, 662153, 1317687, 2622706, 5221951, 10400350, 20720877, 41288823, 82294979, 164052035, 327088649, 652238016, 1300788712, 2594486045, 5175378128, 10324522020
Offset: 0

Views

Author

Gus Wiseman, Nov 20 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers with sum n.

Examples

			The a(0) = 1 through a(5) = 13 compositions:
  ()  (1)  (2)  (3)    (4)      (5)
                (1,2)  (1,3)    (1,4)
                (2,1)  (3,1)    (2,3)
                       (1,1,2)  (3,2)
                       (1,2,1)  (4,1)
                       (2,1,1)  (1,1,3)
                                (1,2,2)
                                (1,3,1)
                                (2,1,2)
                                (2,2,1)
                                (3,1,1)
                                (1,1,2,1)
                                (1,2,1,1)
		

Crossrefs

Looking at multiplicities instead of run-lengths gives A329741.
The complete case is A329749.
Complete compositions are A107429.

Programs

  • Mathematica
    normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],normQ[Length/@Split[#]]&]],{n,0,10}]

Extensions

a(21)-a(26) from Giovanni Resta, Nov 22 2019
a(27)-a(35) from Alois P. Heinz, Jul 06 2020

A329740 Number of compositions of n whose multiplicities are distinct and cover an initial interval of positive integers.

Original entry on oeis.org

1, 1, 1, 1, 4, 7, 4, 10, 10, 10, 73, 196, 133, 379, 319, 379, 502, 805, 562, 1108, 13648, 51448, 51691, 115174, 140011, 178597, 203617, 329737, 292300, 456703, 456160, 608386, 633466, 898186, 823009, 39014392, 190352269, 266293795, 493345615, 834326995, 947714938
Offset: 0

Views

Author

Gus Wiseman, Nov 21 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers with sum n.

Examples

			The a(1) = 1 through a(9) = 10 compositions:
  (1)  (2)  (3)  (4)      (5)      (6)      (7)      (8)      (9)
                 (1,1,2)  (1,1,3)  (1,1,4)  (1,1,5)  (1,1,6)  (1,1,7)
                 (1,2,1)  (1,2,2)  (1,4,1)  (1,3,3)  (1,6,1)  (1,4,4)
                 (2,1,1)  (1,3,1)  (4,1,1)  (1,5,1)  (2,2,4)  (1,7,1)
                          (2,1,2)           (2,2,3)  (2,3,3)  (2,2,5)
                          (2,2,1)           (2,3,2)  (2,4,2)  (2,5,2)
                          (3,1,1)           (3,1,3)  (3,2,3)  (4,1,4)
                                            (3,2,2)  (3,3,2)  (4,4,1)
                                            (3,3,1)  (4,2,2)  (5,2,2)
                                            (5,1,1)  (6,1,1)  (7,1,1)
		

Crossrefs

The version allowing repeated multiplicities is A329741.
Complete compositions are A107429.
Compositions whose multiplicities are distinct are A242882.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Range[Length[Union[#]]]==Sort[Length/@Split[Sort[#]]]&]],{n,0,10}]

Extensions

a(21)-a(40) from Alois P. Heinz, Nov 21 2019

A329741 Number of compositions of n whose multiplicities cover an initial interval of positive integers.

Original entry on oeis.org

1, 1, 1, 3, 6, 11, 14, 34, 52, 114, 225, 464, 539, 1183, 1963, 3753, 6120, 11207, 19808, 38254, 77194, 147906, 224853, 374216, 611081, 1099933, 2129347, 3336099, 5816094, 9797957, 17577710, 29766586, 53276392, 93139668, 163600815, 324464546, 637029845, 1010826499
Offset: 0

Views

Author

Gus Wiseman, Nov 20 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers with sum n.

Examples

			The a(1) = 1 through a(6) = 14 compositions:
  (1)  (2)  (3)    (4)      (5)      (6)
            (1,2)  (1,3)    (1,4)    (1,5)
            (2,1)  (3,1)    (2,3)    (2,4)
                   (1,1,2)  (3,2)    (4,2)
                   (1,2,1)  (4,1)    (5,1)
                   (2,1,1)  (1,1,3)  (1,1,4)
                            (1,2,2)  (1,2,3)
                            (1,3,1)  (1,3,2)
                            (2,1,2)  (1,4,1)
                            (2,2,1)  (2,1,3)
                            (3,1,1)  (2,3,1)
                                     (3,1,2)
                                     (3,2,1)
                                     (4,1,1)
		

Crossrefs

Looking at run-lengths instead of multiplicities gives A329766.
The complete case is A329748.
Complete compositions are A107429.

Programs

  • Mathematica
    normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],normQ[Length/@Split[Sort[#]]]&]],{n,20}]

Extensions

a(0), a(21)-a(37) from Alois P. Heinz, Nov 21 2019

A329749 Number of complete compositions of n whose run-lengths cover an initial interval of positive integers.

Original entry on oeis.org

1, 1, 0, 2, 3, 5, 11, 23, 40, 80, 180, 344, 661, 1321, 2657, 5268, 10481, 20903, 41572, 82734, 164998, 328304, 654510, 1305421, 2598811, 5182174, 10332978, 20594318, 41066611, 81897091, 163309679, 325707492, 649648912, 1295827380, 2584941276, 5156774487
Offset: 0

Views

Author

Gus Wiseman, Nov 21 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers with sum n. It is complete if it covers an initial interval of positive integers.

Examples

			The a(0) = 1 through a(6) = 11 compositions (empty column not shown):
  ()  (1)  (1,2)  (1,1,2)  (1,2,2)    (1,2,3)
           (2,1)  (1,2,1)  (2,1,2)    (1,3,2)
                  (2,1,1)  (2,2,1)    (2,1,3)
                           (1,1,2,1)  (2,3,1)
                           (1,2,1,1)  (3,1,2)
                                      (3,2,1)
                                      (1,2,1,2)
                                      (1,2,2,1)
                                      (2,1,1,2)
                                      (2,1,2,1)
                                      (1,1,2,1,1)
		

Crossrefs

Looking at multiplicities instead of run-lengths gives A329748.
The non-complete version is A329766.
Complete compositions are A107429.

Programs

  • Mathematica
    normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],normQ[#]&&normQ[Length/@Split[#]]&]],{n,0,10}]

Extensions

a(21)-a(35) from Alois P. Heinz, Jul 06 2020

A335443 Number of compositions of n where neighboring runs have different lengths.

Original entry on oeis.org

1, 1, 2, 2, 5, 8, 13, 24, 42, 68, 122, 210, 360, 622, 1077, 1858, 3198, 5519, 9549, 16460, 28386, 49031, 84595, 145988, 251956, 434805, 750418, 1294998, 2234971, 3857106, 6656383, 11487641, 19825318, 34214136, 59046458, 101901743, 175860875, 303498779
Offset: 0

Views

Author

Alois P. Heinz, Jul 06 2020

Keywords

Examples

			a(0) = 1: the empty composition.
a(1) = 1: 1.
a(2) = 2: 2, 11.
a(3) = 2: 3, 111.
a(4) = 5: 4, 22, 112, 211, 1111.
a(5) = 8: 5, 113, 122, 221, 311, 1112, 2111, 11111.
a(6) = 13: 6, 33, 114, 222, 411, 1113, 1221, 2112, 3111, 11112, 11211, 21111, 111111.
a(7) = 24: 7, 115, 133, 223, 322, 331, 511, 1114, 1222, 2113, 2221, 3112, 4111, 11113, 11122, 11311, 21112, 22111, 31111, 111112, 111211, 112111, 211111, 1111111.
a(8) = 42: 8, 44, 116, 224, 233, 332, 422, 611, 1115, 1223, 1331, 2114, 2222, 3113, 3221, 4112, 5111, 11114, 11222, 11411, 12221, 21113, 22211, 31112, 41111, 111113, 111122, 111221, 111311, 112112, 113111, 122111, 211112, 211211, 221111, 311111, 1111112, 1111211, 1112111, 1121111, 2111111, 11111111.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, l, t) option remember; `if`(n=0, 1, add(add(
          `if`(j=t, 0, b(n-i*j, i, j)), j=1..n/i), i={$1..n} minus {l}))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..40);
  • Mathematica
    b[n_, l_, t_] := b[n, l, t] = If[n == 0, 1, Sum[Sum[If[j == t, 0,
         b[n-i*j, i, j]], {j, 1, n/i}], {i, Range[n]~Complement~{l}}]];
    a[n_] := b[n, 0, 0];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Apr 13 2022, after Alois P. Heinz *)
Showing 1-5 of 5 results.