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-10 of 26 results. Next

A374629 Irregular triangle listing the leaders of maximal weakly increasing runs in the n-th composition in standard order.

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 1, 1, 4, 3, 1, 2, 2, 1, 1, 1, 1, 1, 1, 5, 4, 1, 3, 2, 3, 1, 2, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 5, 1, 4, 2, 4, 1, 3, 3, 2, 1, 3, 1, 3, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jul 20 2024

Keywords

Comments

The leaders of maximal weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The 58654th composition in standard order is (1,1,3,2,4,1,1,1,2), with maximal weakly increasing runs ((1,1,3),(2,4),(1,1,1,2)), so row 58654 is (1,2,1).
The nonnegative integers, corresponding compositions, and leaders of maximal weakly increasing runs begin:
    0:      () -> ()      15: (1,1,1,1) -> (1)
    1:     (1) -> (1)     16:       (5) -> (5)
    2:     (2) -> (2)     17:     (4,1) -> (4,1)
    3:   (1,1) -> (1)     18:     (3,2) -> (3,2)
    4:     (3) -> (3)     19:   (3,1,1) -> (3,1)
    5:   (2,1) -> (2,1)   20:     (2,3) -> (2)
    6:   (1,2) -> (1)     21:   (2,2,1) -> (2,1)
    7: (1,1,1) -> (1)     22:   (2,1,2) -> (2,1)
    8:     (4) -> (4)     23: (2,1,1,1) -> (2,1)
    9:   (3,1) -> (3,1)   24:     (1,4) -> (1)
   10:   (2,2) -> (2)     25:   (1,3,1) -> (1,1)
   11: (2,1,1) -> (2,1)   26:   (1,2,2) -> (1)
   12:   (1,3) -> (1)     27: (1,2,1,1) -> (1,1)
   13: (1,2,1) -> (1,1)   28:   (1,1,3) -> (1)
   14: (1,1,2) -> (1)     29: (1,1,2,1) -> (1,1)
		

Crossrefs

Row-leaders are A065120.
Row-lengths are A124766.
Row-sums are A374630.
Positions of constant rows are A374633, counted by A374631.
Positions of strict rows are A374768, counted by A374632.
For other types of runs we have A374251, A374515, A374683, A374740, A374757.
Positions of non-weakly decreasing rows are A375137.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A335456 counts patterns matched by compositions.
All of the following pertain to compositions in standard order:
- Length is A000120.
- Sum is A029837(n+1).
- Leader is A065120.
- Parts are listed by A066099, reverse A228351.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Number of max runs: A124765, A124766, A124767, A124768, A124769, A333381.
- Ranks of anti-run compositions are A333489, counted by A003242.
- Run-length transform is A333627, length A124767, sum A070939.
- Run-compression transform is A373948, sum A373953, excess A373954.
- Ranks of contiguous compositions are A374249, counted by A274174.
- Ranks of non-contiguous compositions are A374253, counted by A335548.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[First/@Split[stc[n],LessEqual],{n,0,100}]

A189076 Number of compositions of n that avoid the pattern 23-1.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 31, 61, 118, 228, 440, 846, 1623, 3111, 5955, 11385, 21752, 41530, 79250, 151161, 288224, 549408, 1047034, 1995000, 3800662, 7239710, 13789219, 26261678, 50012275, 95237360, 181350695, 345315255, 657506300, 1251912618, 2383636280, 4538364446
Offset: 0

Views

Author

N. J. A. Sloane, Apr 16 2011

Keywords

Comments

Note that an exponentiation ^(-1) is missing in Example 4.4. The notation in Theorem 4.3 is complete.
Theorem: The reverse of a composition avoids 23-1 iff its leaders of maximal weakly increasing runs are weakly decreasing. For example, the composition y = (3,2,1,2,2,1,2,5,1,1,1) has maximal weakly increasing runs ((3),(2),(1,2,2),(1,2,5),(1,1,1)), with leaders (3,2,1,1,1), which are weakly decreasing, so the reverse of y is counted under a(21). - Gus Wiseman, Aug 19 2024

Examples

			From _Gus Wiseman_, Aug 19 2024: (Start)
The a(6) = 31 compositions:
  .  (6)  (5,1)  (4,1,1)  (3,1,1,1)  (2,1,1,1,1)  (1,1,1,1,1,1)
          (1,5)  (1,4,1)  (1,3,1,1)  (1,2,1,1,1)
          (4,2)  (1,1,4)  (1,1,3,1)  (1,1,2,1,1)
          (2,4)  (3,2,1)  (1,1,1,3)  (1,1,1,2,1)
          (3,3)  (3,1,2)  (2,2,1,1)  (1,1,1,1,2)
                 (2,3,1)  (2,1,2,1)
                 (2,1,3)  (2,1,1,2)
                 (1,2,3)  (1,2,2,1)
                 (2,2,2)  (1,2,1,2)
                          (1,1,2,2)
Missing is (1,3,2), reverse of (2,3,1).
(End)
		

Crossrefs

The non-dashed version is A102726.
The version for 3-12 is A188900, complement A375406.
Avoiding 12-1 also gives A188920 in reverse.
The version for 13-2 is A189077.
For identical leaders we have A374631, ranks A374633.
For distinct leaders we have A374632, ranks A374768.
The complement is counted by A374636, ranks A375137.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.

Programs

  • Maple
    A189075 := proc(n) local g,i; g := 1; for i from 1 to n do 1-x^i/mul ( 1-x^j,j=i+1..n-i) ; g := g*% ; end do: g := expand(1/g) ; g := taylor(g,x=0,n+1) ; coeftayl(g,x=0,n) ; end proc: # R. J. Mathar, Apr 16 2011
  • Mathematica
    a[n_] := Module[{g = 1, xi}, Do[xi = 1 - x^i/Product[1 - x^j, {j, i+1, n-i}]; g = g xi, {i, n}]; SeriesCoefficient[1/g, {x, 0, n}]];
    a /@ Range[0, 32] (* Jean-François Alcover, Apr 02 2020, after R. J. Mathar *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MatchQ[#,{_,y_,z_,_,x_,_}/;xGus Wiseman, Aug 19 2024 *)

A188920 a(n) is the limiting term of the n-th column of the triangle in A188919.

Original entry on oeis.org

1, 1, 2, 4, 7, 13, 22, 38, 63, 105, 169, 274, 434, 686, 1069, 1660, 2548, 3897, 5906, 8911, 13352, 19917, 29532, 43605, 64056, 93715, 136499, 198059, 286233, 412199, 591455, 845851, 1205687, 1713286, 2427177, 3428611, 4829563, 6784550, 9505840, 13284849
Offset: 0

Views

Author

N. J. A. Sloane, Apr 13 2011

Keywords

Comments

Also the number of integer compositions of n whose reverse avoids 12-1 and 23-1.
Theorem: The reverse of a composition avoids 12-1 and 23-1 iff its leaders of maximal weakly increasing runs, obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each, are strictly decreasing. For example, the composition y = (4,5,3,2,2,3,1,3,5) has reverse (5,3,1,3,2,2,3,5,4), which avoids 12-1 and 23-1, while the maximal weakly increasing runs of y are ((4,5),(3),(2,2,3),(1,3,5)), with leaders (4,3,2,1), which are strictly decreasing, as required. - Gus Wiseman, Aug 20 2024

Examples

			From _Gus Wiseman_, Aug 20 2024: (Start)
The a(0) = 1 through a(6) = 22 compositions:
  ()  (1)  (2)   (3)    (4)     (5)      (6)
           (11)  (12)   (13)    (14)     (15)
                 (21)   (22)    (23)     (24)
                 (111)  (31)    (32)     (33)
                        (112)   (41)     (42)
                        (211)   (113)    (51)
                        (1111)  (122)    (114)
                                (212)    (123)
                                (221)    (132)
                                (311)    (213)
                                (1112)   (222)
                                (2111)   (312)
                                (11111)  (321)
                                         (411)
                                         (1113)
                                         (1122)
                                         (2112)
                                         (2211)
                                         (3111)
                                         (11112)
                                         (21111)
                                         (111111)
(End)
		

Crossrefs

For leaders of identical runs we have A000041.
Matching 23-1 only gives A189076.
An opposite version is A358836.
For identical leaders we have A374631, ranks A374633.
For distinct leaders we have A374632, ranks A374768.
For weakly increasing leaders we have A374635.
For non-weakly decreasing leaders we have A374636, ranks A375137.
For leaders of anti-runs we have A374680.
For leaders of strictly increasing runs we have A374689.
The complement is counted by A375140, ranks A375295, reverse A375296.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.

Programs

  • Mathematica
    b[u_, o_] := b[u, o] = Expand[If[u + o == 0, 1, Sum[b[u - j, o + j - 1]*x^(o + j - 1), {j, 1, u}] + Sum[If[u == 0, b[u + j - 1, o - j]*x^(o - j), 0], {j, 1, o}]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ b[0, n]];
    Take[T[40], 40] (* Jean-François Alcover, Sep 15 2018, after Alois P. Heinz in A188919 *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], Greater@@First/@Split[Reverse[#],LessEqual]&]],{n,0,15}] (* Gus Wiseman, Aug 20 2024 *)
    - or -
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], !MatchQ[#,{_,y_,z_,_,x_,_}/;x<=yGus Wiseman, Aug 20 2024 *)
  • PARI
    B_x(i,N) = {my(x='x+O('x^N), f=(x^i)/(1-x^i)*prod(j=i+1,N-i,1/(1-x^j))); f}
    A_x(N) = {my(x='x+O('x^N), f=1+sum(i=1,N, B_x(i,N)*prod(j=1,i-1,1+B_x(j,N)))); Vec(f)}
    A_x(60) \\ John Tyler Rascoe, Aug 23 2024

Formula

a(n) = 2^(n-1) - A375140(n).
G.f.: 1 + Sum_{i>0} (B(i,x) * Product_{j=1..i-1} (1 + B(j,x))) where B(i,x) = (x^i)/(1-x^i) * Product_{j>i} (1/(1-x^j)). - John Tyler Rascoe, Aug 23 2024

Extensions

More terms from Andrew Baxter, May 17 2011
a(30)-a(39) from Alois P. Heinz, Nov 14 2015

A374632 Number of integer compositions of n whose leaders of weakly increasing runs are distinct.

Original entry on oeis.org

1, 1, 2, 4, 7, 13, 23, 40, 69, 119, 200, 335, 557, 917, 1499, 2433, 3920, 6280, 10004, 15837, 24946, 39087, 60952, 94606, 146203, 224957, 344748, 526239, 800251, 1212527, 1830820, 2754993, 4132192, 6178290, 9209308, 13686754, 20282733, 29973869, 44175908, 64936361
Offset: 0

Views

Author

Gus Wiseman, Jul 23 2024

Keywords

Comments

The leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.

Examples

			The composition (4,2,2,1,1,3) has weakly increasing runs ((4),(2,2),(1,1,3)), with leaders (4,2,1), so is counted under a(13).
The a(0) = 1 through a(5) = 13 compositions:
  ()  (1)  (2)   (3)    (4)     (5)
           (11)  (12)   (13)    (14)
                 (21)   (22)    (23)
                 (111)  (31)    (32)
                        (112)   (41)
                        (211)   (113)
                        (1111)  (122)
                                (212)
                                (221)
                                (311)
                                (1112)
                                (2111)
                                (11111)
		

Crossrefs

Ranked by A374768 = positions of distinct rows in A374629 (sums A374630).
Types of runs (instead of weakly increasing):
- For leaders of constant runs we have A274174, ranks A374249.
- For leaders of anti-runs we have A374518, ranks A374638.
- For leaders of strictly increasing runs we have A374687, ranks A374698.
- For leaders of weakly decreasing runs we have A374743, ranks A335467.
- For leaders of strictly decreasing runs we have A374761, ranks A374767.
Types of run-leaders (instead of distinct):
- For strictly decreasing leaders we appear to have A188920.
- For weakly decreasing leaders we appear to have A189076.
- For identical leaders we have A374631.
- For weakly increasing leaders we have A374635.
- For strictly increasing leaders we have A374634.
A003242 counts anti-run compositions.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A335456 counts patterns matched by compositions.
A374637 counts compositions by sum of leaders of weakly increasing runs.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],UnsameQ@@First/@Split[#,LessEqual]&]],{n,0,15}]
  • PARI
    dfs(m, r, v) = 1 + sum(s=1, min(m, r-1), if(!setsearch(v, s), dfs(m-s, s, setunion(v, [s]))*x^s/(1-x^s) + sum(t=s+1, m-s, dfs(m-s-t, t, setunion(v, [s]))*x^(s+t)/prod(i=s, t, 1-x^i))));
    lista(nn) = Vec(dfs(nn, nn+1, []) + O(x^(1+nn))); \\ Jinyuan Wang, Feb 13 2025

Extensions

More terms from Jinyuan Wang, Feb 13 2025

A374635 Number of integer compositions of n whose leaders of weakly increasing runs are themselves weakly increasing.

Original entry on oeis.org

1, 1, 2, 3, 6, 10, 20, 36, 69, 130, 247, 467, 890, 1689, 3213, 6110, 11627, 22121, 42101, 80124, 152512, 290300, 552609, 1051953, 2002583, 3812326, 7257679, 13816867, 26304254, 50077792, 95338234, 181505938, 345554234, 657874081, 1252478707, 2384507463, 4539705261
Offset: 0

Views

Author

Gus Wiseman, Jul 23 2024

Keywords

Comments

The leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.

Examples

			The composition (1,3,3,2,4,2) has weakly increasing runs ((1,3,3),(2,4),(2)), with leaders (1,2,2), so is counted under a(15).
The a(0) = 1 through a(6) = 20 compositions:
  ()  (1)  (2)   (3)    (4)     (5)      (6)
           (11)  (12)   (13)    (14)     (15)
                 (111)  (22)    (23)     (24)
                        (112)   (113)    (33)
                        (121)   (122)    (114)
                        (1111)  (131)    (123)
                                (1112)   (132)
                                (1121)   (141)
                                (1211)   (222)
                                (11111)  (1113)
                                         (1122)
                                         (1131)
                                         (1212)
                                         (1221)
                                         (1311)
                                         (11112)
                                         (11121)
                                         (11211)
                                         (12111)
                                         (111111)
		

Crossrefs

Ranked by positions of weakly increasing rows in A374629 (sums A374630).
Types of runs (instead of weakly increasing):
- For leaders of constant runs we have A000041.
- For leaders of weakly decreasing runs we have A188900.
- For leaders of anti-runs we have A374681.
- For leaders of strictly increasing runs we have A374690.
- For leaders of strictly decreasing runs we have A374764.
Types of run-leaders (instead of weakly increasing):
- For strictly decreasing leaders we appear to have A188920.
- For weakly decreasing leaders we appear to have A189076.
- For identical leaders we have A374631.
- For distinct leaders we have A374632, ranks A374768.
- For strictly increasing leaders we have A374634.
A003242 counts anti-run compositions.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A274174 counts contiguous compositions, ranks A374249.
A335456 counts patterns matched by compositions.
A335548 counts non-contiguous compositions, ranks A374253.
A374637 counts compositions by sum of leaders of weakly increasing runs.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],LessEqual@@First/@Split[#,LessEqual]&]],{n,0,15}]
  • PARI
    dfs(m, r, u) = 1 + sum(s=u, min(m, r-1), x^s/(1-x^s) + sum(t=s+1, m-s, dfs(m-s-t, t, s)*x^(s+t)/prod(i=s, t, 1-x^i)));
    lista(nn) = Vec(dfs(nn, nn+1, 1) + O(x^(1+nn))); \\ Jinyuan Wang, Feb 13 2025

Extensions

More terms from Jinyuan Wang, Feb 13 2025

A374761 Number of integer compositions of n whose leaders of strictly decreasing runs are distinct.

Original entry on oeis.org

1, 1, 1, 3, 5, 7, 13, 27, 45, 73, 117, 205, 365, 631, 1061, 1711, 2777, 4599, 7657, 12855, 21409, 35059, 56721, 91149, 146161, 234981, 379277, 612825, 988781, 1587635, 2533029, 4017951, 6342853, 9985087, 15699577, 24679859, 38803005, 60979839, 95698257, 149836255
Offset: 0

Views

Author

Gus Wiseman, Jul 29 2024

Keywords

Comments

The leaders of strictly decreasing runs in a sequence are obtained by splitting it into maximal strictly decreasing subsequences and taking the first term of each.

Examples

			The composition (3,1,4,3,2,1,2,8) has strictly decreasing runs ((3,1),(4,3,2,1),(2),(8)), with leaders (3,4,2,8), so is counted under a(24).
The a(0) = 1 through a(6) = 13 compositions:
  ()  (1)  (2)  (3)   (4)    (5)    (6)
                (12)  (13)   (14)   (15)
                (21)  (31)   (23)   (24)
                      (121)  (32)   (42)
                      (211)  (41)   (51)
                             (131)  (123)
                             (311)  (132)
                                    (141)
                                    (213)
                                    (231)
                                    (312)
                                    (321)
                                    (411)
		

Crossrefs

For leaders of identical runs we have A274174, ranked by A374249.
The weak opposite version is A374632, ranks A374768.
The opposite version is A374687, ranks A374698.
For identical instead of distinct leaders we have A374760, ranks A374759.
The weak version is A374743, ranks A374701.
Ranked by A374767.
For partitions instead of compositions we have A375133.
Other types of runs:
- For leaders of identical runs we have A000005 for n > 0, ranks A272919.
- For leaders of anti-runs we have A374518, ranked by A374638.
Other types of run-leaders:
- For strictly increasing leaders we have A374762.
- For strictly decreasing leaders we have A374763.
- For weakly increasing leaders we have A374764.
- For weakly decreasing leaders we have A374765.
A003242 counts anti-run compositions, ranks A333489.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A373949 counts compositions by run-compressed sum, opposite A373951.
A374700 counts compositions by sum of leaders of strictly increasing runs.

Programs

  • Mathematica
    Table[Length[Select[Join @@ Permutations/@IntegerPartitions[n],UnsameQ@@First/@Split[#,Greater]&]],{n,0,15}]
  • PARI
    dfs(m, r, v) = 1 + sum(s=r, m, if(!setsearch(v, s), dfs(m-s, s, setunion(v, [s]))*x^s + sum(t=1, min(s-1, m-s), dfs(m-s-t, t, setunion(v, [s]))*x^(s+t)*prod(i=t+1, s-1, 1+x^i))));
    lista(nn) = Vec(dfs(nn, 1, []) + O(x^(1+nn))); \\ Jinyuan Wang, Feb 13 2025

Extensions

More terms from Jinyuan Wang, Feb 13 2025

A374768 Numbers k such that the leaders of weakly increasing runs in the k-th composition in standard order (A066099) are distinct.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 28, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 50, 52, 56, 58, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 78, 79, 80, 81
Offset: 1

Views

Author

Gus Wiseman, Jul 19 2024

Keywords

Comments

First differs from A335467 in having 166, corresponding to the composition (2,3,1,2).
The leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The 4444th composition in standard order is (4,2,2,1,1,3), with weakly increasing runs ((4),(2,2),(1,1,3)), with leaders (4,2,1), so 4444 is in the sequence.
		

Crossrefs

These are the positions of strict rows in A374629 (which has sums A374630).
Compositions of this type are counted by A374632, increasing A374634.
Identical instead of distinct leaders are A374633, counted by A374631.
For leaders of anti-runs we have A374638, counted by A374518.
For leaders of strictly increasing runs we have A374698, counted by A374687.
For leaders of weakly decreasing runs we have A374701, counted by A374743.
For leaders of strictly decreasing runs we have A374767, counted by A374761.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
All of the following pertain to compositions in standard order:
- Ones are counted by A000120.
- Sum is A029837 (or sometimes A070939).
- Parts are listed by A066099.
- Length is A070939.
- Adjacent equal pairs are counted by A124762, unequal A333382.
- Number of max runs: A124765, A124766, A124767, A124768, A124769, A333381.
- Ranks of strict compositions are A233564.
- Ranks of constant compositions are A272919.
- Ranks of anti-run compositions are A333489, counted by A003242.
- Run-length transform is A333627.
- Run-compression transform is A373948, sum A373953, excess A373954.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,166],UnsameQ@@First/@Split[stc[#],LessEqual]&]

A374517 Number of integer compositions of n whose leaders of anti-runs are identical.

Original entry on oeis.org

1, 1, 2, 4, 7, 13, 25, 46, 85, 160, 301, 561, 1056, 1984, 3730, 7037, 13273, 25056, 47382, 89666, 169833, 322038, 611128, 1160660, 2206219, 4196730, 7988731, 15217557, 29005987, 55321015, 105570219, 201569648, 385059094, 735929616, 1407145439, 2691681402
Offset: 0

Views

Author

Gus Wiseman, Aug 01 2024

Keywords

Comments

The leaders of anti-runs in a sequence are obtained by splitting it into maximal consecutive anti-runs (sequences with no adjacent equal terms) and taking the first term of each.

Examples

			The a(0) = 1 through a(5) = 13 compositions:
  ()  (1)  (2)   (3)    (4)     (5)
           (11)  (12)   (13)    (14)
                 (21)   (22)    (23)
                 (111)  (31)    (32)
                        (112)   (41)
                        (121)   (113)
                        (1111)  (131)
                                (212)
                                (221)
                                (1112)
                                (1121)
                                (1211)
                                (11111)
		

Crossrefs

For partitions instead of compositions we have A034296 or A115029.
These compositions have ranks A374519.
The complement is counted by A374640.
Other types of runs (instead of anti-):
- For leaders of identical runs we have A000005 for n > 0, ranks A272919.
- For leaders of weakly increasing runs we have A374631, ranks A374633.
- For leaders of strictly increasing runs we have A374686, ranks A374685.
- For leaders of weakly decreasing runs we have A374742, ranks A374741.
- For leaders of strictly decreasing runs we have A374760, ranks A374759.
Other types of run-leaders (instead of identical):
- For distinct leaders we have A374518.
- For weakly increasing leaders we have A374681.
- For strictly increasing leaders we have A374679.
- For weakly decreasing leaders we have A374682.
- For strictly decreasing leaders we have A374680.
A003242 counts anti-runs, ranks A333489.
A106356 counts compositions by number of maximal anti-runs.
A238279 counts compositions by number of maximal runs
A238424 counts partitions whose first differences are an anti-run.
A274174 counts contiguous compositions, ranks A374249.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],SameQ@@First/@Split[#,UnsameQ]&]],{n,0,15}]
  • PARI
    C_x(N) = {my(g =1/(1 - sum(k=1, N, x^k/(1+x^k))));g}
    A_x(i,N) = {my(x='x+O('x^N), f=(x^i)*(C_x(N)*(x^i)+x^i+1)/(1+x^i)^2);f}
    B_x(i,j,N) = {my(x='x+O('x^N), f=C_x(N)*x^(i+j)/((1+x^i)*(1+x^j)));f}
    D_x(N) = {my(x='x+O('x^N), f=1+sum(i=1,N,-1+sum(j=0,N-i, A_x(i,N)^j)*(1-B_x(i,i,N)+sum(k=1,N-i,B_x(i,k,N)))));Vec(f)}
    D_x(30) \\ John Tyler Rascoe, Aug 16 2024

Formula

G.f.: 1 + Sum_{i>0} (-1 + Sum_{j>=0} (A(i,x)^j)*(1 + Sum_{k>0, k<>i} (B(i,k,x)))) where A(i,x) = (x^i)*(C(x)*(x^i) + x^i + 1)/(1+x^i)^2, B(i,k,x) = C(x)*x^(i+k)/((1+x^i)*(1+x^k)), and C(x) is the g.f. for A003242. - John Tyler Rascoe, Aug 16 2024

Extensions

a(26) onwards from John Tyler Rascoe, Aug 16 2024

A374634 Number of integer compositions of n whose leaders of weakly increasing runs are strictly increasing.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 12, 17, 28, 43, 67, 103, 162, 245, 374, 569, 854, 1278, 1902, 2816, 4148, 6087, 8881, 12926, 18726, 27042, 38894, 55789, 79733, 113632, 161426, 228696, 323049, 455135, 639479, 896249, 1252905, 1747327, 2431035, 3374603, 4673880, 6459435, 8908173
Offset: 0

Views

Author

Gus Wiseman, Jul 23 2024

Keywords

Comments

The leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.

Examples

			The composition (1,3,3,2,4,3) has weakly increasing runs ((1,3,3),(2,4),(3)), with leaders (1,2,3), so is counted under a(16).
The a(0) = 1 through a(7) = 17 compositions:
  ()  (1)  (2)   (3)    (4)     (5)      (6)       (7)
           (11)  (12)   (13)    (14)     (15)      (16)
                 (111)  (22)    (23)     (24)      (25)
                        (112)   (113)    (33)      (34)
                        (1111)  (122)    (114)     (115)
                                (1112)   (123)     (124)
                                (11111)  (132)     (133)
                                         (222)     (142)
                                         (1113)    (223)
                                         (1122)    (1114)
                                         (11112)   (1123)
                                         (111111)  (1132)
                                                   (1222)
                                                   (11113)
                                                   (11122)
                                                   (111112)
                                                   (1111111)
		

Crossrefs

Ranked by positions of strictly increasing rows in A374629 (sums A374630).
Types of runs (instead of weakly increasing):
- For leaders of constant runs we have A000041.
- For leaders of anti-runs we have A374679.
- For leaders of strictly increasing runs we have A374688.
- For leaders of strictly decreasing runs we have A374762.
Types of run-leaders (instead of strictly increasing):
- For strictly decreasing leaders we appear to have A188920.
- For weakly decreasing leaders we appear to have A189076.
- For identical leaders we have A374631.
- For distinct leaders we have A374632, ranks A374768.
- For weakly increasing leaders we have A374635.
A003242 counts anti-run compositions.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A274174 counts contiguous compositions, ranks A374249.
A335456 counts patterns matched by compositions.
A335548 counts non-contiguous compositions, ranks A374253.
A374637 counts compositions by sum of leaders of weakly increasing runs.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations /@ IntegerPartitions[n],Less@@First/@Split[#,LessEqual]&]],{n,0,15}]
  • PARI
    dfs(m, r, u) = 1 + sum(s=u+1, min(m, r-1), x^s/(1-x^s) + sum(t=s+1, m-s, dfs(m-s-t, t, s)*x^(s+t)/prod(i=s, t, 1-x^i)));
    lista(nn) = Vec(dfs(nn, nn+1, 0) + O(x^(1+nn))); \\ Jinyuan Wang, Feb 13 2025

Extensions

More terms from Jinyuan Wang, Feb 13 2025

A374630 Sum of leaders of weakly increasing runs in the n-th composition in standard order.

Original entry on oeis.org

0, 1, 2, 1, 3, 3, 1, 1, 4, 4, 2, 3, 1, 2, 1, 1, 5, 5, 5, 4, 2, 3, 3, 3, 1, 2, 1, 2, 1, 2, 1, 1, 6, 6, 6, 5, 3, 6, 4, 4, 2, 3, 2, 3, 3, 4, 3, 3, 1, 2, 3, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 1, 7, 7, 7, 6, 7, 7, 5, 5, 3, 4, 5, 6, 4, 5, 4, 4, 2, 3, 4, 3, 2, 3, 3
Offset: 0

Views

Author

Gus Wiseman, Jul 20 2024

Keywords

Comments

The leaders of weakly increasing runs in a sequence are obtained by splitting it into maximal weakly increasing subsequences and taking the first term of each.
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Examples

			The maximal weakly increasing subsequences of the 1234567th composition in standard order are ((3),(2),(1,2,2),(1,2,5),(1,1,1)), so a(1234567) = 8.
		

Crossrefs

For length instead of sum we have A124766.
For leaders of constant runs we have A373953, excess A373954.
For leaders of anti-runs we have A374516.
Row-sums of A374629.
Counting compositions by this statistic gives A374637.
For leaders of strictly increasing runs we have A374684.
For leaders of weakly decreasing runs we have A374741.
For leaders of strictly decreasing runs we have A374758
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A335456 counts patterns matched by compositions.
A373949 counts compositions by run-compressed sum, opposite A373951.
All of the following pertain to compositions in standard order:
- Ones are counted by A000120.
- Sum is A029837 (or sometimes A070939).
- Listed by A066099.
- Length is A070939.
- Number of adjacent equal pairs is A124762, unequal A333382.
- Number of max runs: A124765, A124766, A124767, A124768, A124769, A333381.
- Ranks of strict compositions are A233564, counted by A032020.
- Constant compositions are ranked by A272919.
- Ranks of anti-run compositions are A333489, counted by A003242.
- Run-length transform is A333627.
- Run-compression transform is A373948.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[Total[First/@Split[stc[n],LessEqual]],{n,0,100}]
Showing 1-10 of 26 results. Next