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.

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

A375137 Numbers k such that the k-th composition in standard order (row k of A066099) matches the dashed pattern 1-32.

Original entry on oeis.org

50, 98, 101, 114, 178, 194, 196, 197, 202, 203, 210, 226, 229, 242, 306, 324, 354, 357, 370, 386, 388, 389, 393, 394, 395, 402, 404, 405, 406, 407, 418, 421, 434, 450, 452, 453, 458, 459, 466, 482, 485, 498, 562, 610, 613, 626, 644, 649, 690, 706, 708, 709
Offset: 1

Views

Author

Gus Wiseman, Aug 09 2024

Keywords

Comments

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.
These are also numbers k such that the maximal weakly increasing runs in the k-th composition in standard order do not have weakly decreasing leaders, where 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 reverse version (A375138) ranks compositions matching the dashed pattern 23-1.

Examples

			Composition 102 is (1,3,1,2), which matches 1-3-2 but not 1-32.
Composition 210 is (1,2,3,2), which matches 1-32 but not 132.
Composition 358 is (2,1,3,1,2), which matches 2-3-1 and 1-3-2 but not 23-1 or 1-32.
The terms together with corresponding compositions begin:
   50: (1,3,2)
   98: (1,4,2)
  101: (1,3,2,1)
  114: (1,1,3,2)
  178: (2,1,3,2)
  194: (1,5,2)
  196: (1,4,3)
  197: (1,4,2,1)
  202: (1,3,2,2)
  203: (1,3,2,1,1)
  210: (1,2,3,2)
  226: (1,1,4,2)
  229: (1,1,3,2,1)
  242: (1,1,1,3,2)
		

Crossrefs

The complement is too dense, but counted by A189076.
The non-dashed version is A335480, reverse A335482.
For leaders of identical runs we have A335485, reverse A335486.
For identical leaders we have A374633, counted by A374631.
Compositions of this type are counted by A374636.
For distinct leaders we have A374768, counted by A374632.
The reverse version is A375138, counted by A374636.
For leaders of strictly increasing runs we have A375139, counted by A375135.
Matching 1-21 also gives A375295, counted by A375140 (complement A188920).
A003242 counts anti-runs, ranks A333489.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
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.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Run-length transform is A333627, sum A070939.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],MatchQ[stc[#],{_,x_,_,z_,y_,_}/;x
    				

A375140 Number of integer compositions of n whose leaders of weakly increasing runs are not strictly decreasing.

Original entry on oeis.org

0, 0, 0, 1, 3, 10, 26, 65, 151, 343, 750, 1614, 3410, 7123, 14724, 30220, 61639, 125166, 253233, 510936, 1028659, 2067620, 4150699, 8324552, 16683501, 33417933, 66910805, 133931495, 268023257, 536279457, 1072895973, 2146277961, 4293254010, 8587507415
Offset: 1

Views

Author

Gus Wiseman, Aug 10 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.
Also the number of integer compositions of n matching the dashed patterns 1-32 or 1-21.

Examples

			The a(1) = 0 through a(6) = 10 compositions:
     .  .  .  (121)  (131)   (132)
                     (1121)  (141)
                     (1211)  (1131)
                             (1212)
                             (1221)
                             (1311)
                             (2121)
                             (11121)
                             (11211)
                             (12111)
		

Crossrefs

For leaders of identical runs we have A056823.
The complement is counted by A188920.
Leaders of weakly increasing runs are rows of A374629, sum A374630.
For weakly decreasing leaders we have A374636, ranks A375137 or A375138.
For leaders of weakly decreasing runs we have the complement of A374746.
Compositions of this type are ranked by A375295, reverse A375296.
A003242 counts anti-runs, ranks A333489.
A106356 counts compositions by number of maximal anti-runs.
A238424 counts partitions whose first differences are an anti-run.
A274174 counts contiguous compositions, ranks A374249.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
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],!Greater@@First/@Split[#,LessEqual]&]],{n,15}]
    - or -
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],MatchQ[#,{_,x_,_,z_,y_,_}/;x<=y
    				

Formula

a(n) = 2^(n-1) - A188920(n).

A375296 Numbers k such that the leaders of maximal weakly increasing runs in the reverse of the k-th composition in standard order (row k of A228351) are not strictly decreasing.

Original entry on oeis.org

13, 25, 27, 29, 41, 45, 49, 51, 53, 54, 55, 57, 59, 61, 77, 81, 82, 83, 89, 91, 93, 97, 99, 101, 102, 103, 105, 107, 108, 109, 110, 111, 113, 115, 117, 118, 119, 121, 123, 125, 141, 145, 153, 155, 157, 161, 162, 163, 165, 166, 167, 169, 173, 177, 179, 181, 182
Offset: 1

Views

Author

Gus Wiseman, Aug 13 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.
Also numbers k such that the k-th composition in standard order (row k of A066099) matches the dashed patterns 23-1 or 12-1.

Examples

			The sequence together with corresponding compositions begins:
  13: (1,2,1)
  25: (1,3,1)
  27: (1,2,1,1)
  29: (1,1,2,1)
  41: (2,3,1)
  45: (2,1,2,1)
  49: (1,4,1)
  51: (1,3,1,1)
  53: (1,2,2,1)
  54: (1,2,1,2)
  55: (1,2,1,1,1)
  57: (1,1,3,1)
  59: (1,1,2,1,1)
  61: (1,1,1,2,1)
		

Crossrefs

For leaders of identical runs we have A335486, reverse A335485.
Matching 1-32 only gives A375138, reverse A375137, both counted by A374636.
Compositions of this type are counted by A375140, complement A188920.
The reverse version is A375295.
A003242 counts anti-runs, ranks A333489.
A011782 counts compositions.
A238130, A238279, A333755 count compositions by number of runs.
A274174 counts contiguous compositions, ranks A374249.
A374637 counts compositions by sum of leaders of weakly increasing runs.
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.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Run-length transform is A333627, sum A070939.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],!Greater@@First/@Split[Reverse[stc[#]],LessEqual]&]
    - or -
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,300],MatchQ[stc[#],{_,y_,z_,_,x_,_}/;x<=y
    				

A375139 Numbers k such that the leaders of strictly increasing runs in the k-th composition in standard order are not weakly decreasing.

Original entry on oeis.org

26, 50, 53, 58, 90, 98, 100, 101, 106, 107, 114, 117, 122, 154, 164, 178, 181, 186, 194, 196, 197, 201, 202, 203, 210, 212, 213, 214, 215, 218, 226, 228, 229, 234, 235, 242, 245, 250, 282, 306, 309, 314, 324, 329, 346, 354, 356, 357, 362, 363, 370, 373, 378
Offset: 1

Views

Author

Gus Wiseman, Aug 12 2024

Keywords

Comments

The leaders of strictly increasing runs in a sequence are obtained by splitting it into maximal strictly 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 terms together with corresponding compositions begin:
   26: (1,2,2)
   50: (1,3,2)
   53: (1,2,2,1)
   58: (1,1,2,2)
   90: (2,1,2,2)
   98: (1,4,2)
  100: (1,3,3)
  101: (1,3,2,1)
  106: (1,2,2,2)
  107: (1,2,2,1,1)
  114: (1,1,3,2)
  117: (1,1,2,2,1)
  122: (1,1,1,2,2)
  154: (3,1,2,2)
  164: (2,3,3)
  178: (2,1,3,2)
  181: (2,1,2,2,1)
  186: (2,1,1,2,2)
		

Crossrefs

For leaders of identical runs we have A335485.
Ranked by positions of non-weakly decreasing rows in A374683.
For identical leaders we have A374685, counted by A374686.
The complement is counted by A374697.
For distinct leaders we have A374698, counted by A374687.
Compositions of this type are counted by A375135.
Weakly increasing leaders: A375137, counts A374636, complement A189076.
Interchanging weak/strict: A375295, counted by A375140, complement A188920.
A003242 counts anti-run compositions, ranks A333489.
A374700 counts compositions by sum of leaders of strictly increasing runs.
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.
- Strict compositions are A233564.
- Run-length transform is A333627, sum A070939.
- 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,100],!GreaterEqual@@First/@Split[stc[#],Less]&]
Showing 1-5 of 5 results.