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.

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

A332340 Number of widely alternately co-strongly normal compositions of n.

Original entry on oeis.org

1, 1, 1, 3, 3, 4, 9, 11, 13, 23, 53, 78, 120, 207, 357, 707, 1183, 2030, 3558, 6229, 10868
Offset: 0

Views

Author

Gus Wiseman, Feb 17 2020

Keywords

Comments

An integer partition is widely alternately co-strongly normal if either it is constant 1's (wide) or it covers an initial interval of positive integers (normal) with weakly increasing run-length (co-strong) which, if reversed, are themselves a widely alternately co-strongly normal partition.

Examples

			The a(1) = 1 through a(8) = 13 compositions:
  (1)  (11)  (12)   (121)   (122)    (123)     (1213)     (1232)
             (21)   (211)   (212)    (132)     (1231)     (1322)
             (111)  (1111)  (1211)   (213)     (1312)     (2123)
                            (11111)  (231)     (1321)     (2132)
                                     (312)     (2122)     (2312)
                                     (321)     (2131)     (2321)
                                     (1212)    (2311)     (3122)
                                     (2121)    (3121)     (3212)
                                     (111111)  (3211)     (12131)
                                               (12121)    (13121)
                                               (1111111)  (21212)
                                                          (122111)
                                                          (11111111)
For example, starting with the composition y = (122111) and repeatedly taking run-lengths and reversing gives (122111) -> (321) -> (111). All of these are normal with weakly increasing run-lengths and the last is all 1's, so y is counted under a(8).
		

Crossrefs

Normal compositions are A107429.
Compositions with normal run-lengths are A329766.
The Heinz numbers of the case of partitions are A332290.
The case of partitions is A332289.
The total (instead of alternating) version is A332337.
Not requiring normality gives A332338.
The strong version is this same sequence.
The narrow version is a(n) + 1 for n > 1.

Programs

  • Mathematica
    totnQ[ptn_]:=Or[ptn=={},Union[ptn]=={1},And[Union[ptn]==Range[Max[ptn]],LessEqual@@Length/@Split[ptn],totnQ[Reverse[Length/@Split[ptn]]]]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],totnQ]],{n,0,10}]

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

A244164 Number of compositions of n in which the minimal multiplicity of parts equals 1.

Original entry on oeis.org

1, 1, 3, 6, 15, 23, 53, 94, 203, 404, 855, 1648, 3416, 6662, 13400, 26406, 53038, 105306, 212051, 422162, 849267, 1696864, 3406077, 6807024, 13642099, 27268122, 54576003, 109096436, 218250874, 436243705, 872533347, 1744312748, 3488432736, 6974783481
Offset: 1

Views

Author

Alois P. Heinz, Jun 21 2014

Keywords

Examples

			From _Gus Wiseman_, Nov 25 2019: (Start)
The a(1) = 1 through a(5) = 15 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,1,2)
                            (1,1,2,1)
                            (1,2,1,1)
                            (2,1,1,1)
(End)
		

Crossrefs

Column k=1 of A242451.
The complement is counted by A240085.

Programs

  • Maple
    b:= proc(n, i, p, k) option remember; `if`(n=0, p!, `if`(i<1, 0,
          add(b(n-i*j, i-1, p+j, k)/j!, j=[0, $max(1, k)..n/i])))
        end:
    a:= n-> b(n$2, 0, 1) -b(n$2, 0, 2):
    seq(a(n), n=1..50);
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Min@@Length/@Split[Sort[#]]==1&]],{n,0,10}] (* Gus Wiseman, Nov 25 2019 *)

Formula

a(n) = 2^(n-1) - A240085(n). - Gus Wiseman, Nov 25 2019

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

Original entry on oeis.org

1, 1, 0, 2, 3, 3, 6, 12, 12, 42, 114, 210, 60, 360, 720, 1320, 1590, 3690, 6450, 16110, 33120, 59940, 61320, 112980, 171780, 387240, 803880, 769440, 1773240, 2823240, 5790960, 9916200, 19502280, 28244160, 56881440, 130548600, 279578880, 320554080, 541323720
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(1) = 1 through a(8) = 12 compositions (empty column not shown):
  (1)  (12)  (112)  (122)  (123)  (1123)  (1223)
       (21)  (121)  (212)  (132)  (1132)  (1232)
             (211)  (221)  (213)  (1213)  (1322)
                           (231)  (1231)  (2123)
                           (312)  (1312)  (2132)
                           (321)  (1321)  (2213)
                                  (2113)  (2231)
                                  (2131)  (2312)
                                  (2311)  (2321)
                                  (3112)  (3122)
                                  (3121)  (3212)
                                  (3211)  (3221)
		

Crossrefs

Looking at run-lengths instead of multiplicities gives A329749.
The non-complete version is A329741.
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[Sort[#]]]&]],{n,0,10}]

Extensions

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

A335942 Number of compositions of n such that the set s of parts and multiplicities satisfies s = {1..max(s)}.

Original entry on oeis.org

1, 1, 2, 2, 3, 12, 12, 32, 51, 144, 191, 486, 679, 1487, 3149, 5909, 11637, 18630, 36928, 76431, 141009, 264784, 535057, 921105, 1774022, 3388054, 6303519, 12255373, 22527578, 43358822, 77695383, 145170435, 264722429, 527776034, 936538336, 1807344134
Offset: 0

Views

Author

Alois P. Heinz, Jun 30 2020

Keywords

Examples

			a(4) = 3: 211, 121, 112.
a(5) = 12: 23, 32, 113, 122, 131, 212, 221, 311, 1112, 1121, 1211, 2111.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, s, p) option remember;
         `if`(n=0, `if`(s={$0..max(s)}, p!, 0), `if`(i<1, 0, add(
          b(n-i*j, i-1, {s[], j, `if`(j=0, 0, i)}, p+j)/j!, j=0..n/i)))
        end:
    a:= n-> b(n, floor((sqrt(1+8*(n+1))-1)/2), {0}, 0):
    seq(a(n), n=0..35);
  • Mathematica
    b[n_, i_, s_, p_] := b[n, i, s, p] =
         If[n == 0, If[s == Range[0, Max[s]], p!, 0], If[i < 1, 0, Sum[
         b[n - i*j, i - 1, Union@Flatten@{s, j, If[j == 0, 0, i]}, p + j]/j!,
         {j, 0, n/i}]]];
    a[n_] := b[n, Floor[(Sqrt[1 + 8*(n + 1)] - 1)/2], {0}, 0];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, May 30 2022, after Alois P. Heinz *)

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
Showing 1-7 of 7 results.