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 12 results. Next

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

A335479 Numbers k such that the k-th composition in standard order (A066099) matches the pattern (1,2,3).

Original entry on oeis.org

52, 104, 105, 108, 116, 180, 200, 208, 209, 210, 211, 212, 216, 217, 220, 232, 233, 236, 244, 308, 328, 360, 361, 364, 372, 400, 401, 404, 408, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 428, 432, 433, 434, 435, 436, 440, 441, 444, 456, 464, 465, 466
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2020

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.
We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1).

Examples

			The sequence of terms together with the corresponding compositions begins:
   52: (1,2,3)
  104: (1,2,4)
  105: (1,2,3,1)
  108: (1,2,1,3)
  116: (1,1,2,3)
  180: (2,1,2,3)
  200: (1,3,4)
  208: (1,2,5)
  209: (1,2,4,1)
  210: (1,2,3,2)
  211: (1,2,3,1,1)
  212: (1,2,2,3)
  216: (1,2,1,4)
  217: (1,2,1,3,1)
  220: (1,2,1,1,3)
		

Crossrefs

The version counting permutations is A056986.
Patterns matching this pattern are counted by A335515 (by length).
Permutations of prime indices matching this pattern are counted by A335520.
These compositions are counted by A335514 (by sum).
Constant patterns are counted by A000005 and ranked by A272919.
Permutations are counted by A000142 and ranked by A333218.
Patterns are counted by A000670 and ranked by A333217.
Non-unimodal compositions are counted by A115981 and ranked by A335373.
Combinatory separations are counted by A269134.
Patterns matched by standard compositions are counted by A335454.
Minimal patterns avoided by a standard composition are counted by A335465.
Other permutations:
- A335479 (1,2,3)
- A335480 (1,3,2)
- A335481 (2,1,3)
- A335482 (2,3,1)
- A335483 (3,1,2)
- A335484 (3,2,1)

Programs

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

A335482 Numbers k such that the k-th composition in standard order (A066099) matches the pattern (2,3,1).

Original entry on oeis.org

41, 81, 83, 89, 105, 145, 161, 163, 165, 166, 167, 169, 177, 179, 185, 209, 211, 217, 233, 289, 290, 291, 297, 305, 321, 323, 325, 326, 327, 329, 331, 332, 333, 334, 335, 337, 339, 345, 353, 355, 357, 358, 359, 361, 369, 371, 377, 401, 417, 419, 421, 422, 423
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2020

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.
We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1).

Examples

			The sequence of terms together with the corresponding compositions begins:
   41: (2,3,1)
   81: (2,4,1)
   83: (2,3,1,1)
   89: (2,1,3,1)
  105: (1,2,3,1)
  145: (3,4,1)
  161: (2,5,1)
  163: (2,4,1,1)
  165: (2,3,2,1)
  166: (2,3,1,2)
  167: (2,3,1,1,1)
  169: (2,2,3,1)
  177: (2,1,4,1)
  179: (2,1,3,1,1)
  185: (2,1,1,3,1)
		

Crossrefs

The version counting permutations is A056986.
Patterns matching this pattern are counted by A335515 (by length).
Permutations of prime indices matching this pattern are counted by A335520.
These compositions are counted by A335514 (by sum).
Constant patterns are counted by A000005 and ranked by A272919.
Permutations are counted by A000142 and ranked by A333218.
Patterns are counted by A000670 and ranked by A333217.
Non-unimodal compositions are counted by A115981 and ranked by A335373.
Permutations matching (1,3,2,4) are counted by A158009.
Combinatory separations are counted by A269134.
Patterns matched by standard compositions are counted by A335454.
Minimal patterns avoided by a standard composition are counted by A335465.
Other permutations:
- A335479 (1,2,3)
- A335480 (1,3,2)
- A335481 (2,1,3)
- A335482 (2,3,1)
- A335483 (3,1,2)
- A335484 (3,2,1)

Programs

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

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
    				

A335483 Numbers k such that the k-th composition in standard order (A066099) matches the pattern (3,1,2).

Original entry on oeis.org

38, 70, 77, 78, 102, 134, 140, 141, 142, 150, 154, 155, 157, 158, 166, 198, 205, 206, 230, 262, 268, 269, 270, 276, 278, 281, 282, 283, 284, 285, 286, 294, 301, 302, 306, 308, 309, 310, 311, 314, 315, 317, 318, 326, 333, 334, 358, 390, 396, 397, 398, 406, 410
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2020

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.
We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1).

Examples

			The sequence of terms together with the corresponding compositions begins:
   38: (3,1,2)
   70: (4,1,2)
   77: (3,1,2,1)
   78: (3,1,1,2)
  102: (1,3,1,2)
  134: (5,1,2)
  140: (4,1,3)
  141: (4,1,2,1)
  142: (4,1,1,2)
  150: (3,2,1,2)
  154: (3,1,2,2)
  155: (3,1,2,1,1)
  157: (3,1,1,2,1)
  158: (3,1,1,1,2)
  166: (2,3,1,2)
		

Crossrefs

The version counting permutations is A056986.
Patterns matching this pattern are counted by A335515 (by length).
Permutations of prime indices matching this pattern are counted by A335520.
These compositions are counted by A335514 (by sum).
Constant patterns are counted by A000005 and ranked by A272919.
Permutations are counted by A000142 and ranked by A333218.
Patterns are counted by A000670 and ranked by A333217.
Non-unimodal compositions are counted by A115981 and ranked by A335373.
Permutations matching (1,3,2,4) are counted by A158009.
Combinatory separations are counted by A269134.
Patterns matched by standard compositions are counted by A335454.
Minimal patterns avoided by a standard composition are counted by A335465.
Other permutations:
- A335479 (1,2,3)
- A335480 (1,3,2)
- A335481 (2,1,3)
- A335482 (2,3,1)
- A335483 (3,1,2)
- A335484 (3,2,1)

Programs

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

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

Original entry on oeis.org

41, 81, 83, 105, 145, 161, 163, 165, 166, 167, 169, 209, 211, 233, 289, 290, 291, 297, 321, 323, 325, 326, 327, 329, 331, 332, 333, 334, 335, 337, 339, 361, 401, 417, 419, 421, 422, 423, 425, 465, 467, 489, 545, 553, 577, 578, 579, 581, 582, 583, 593, 595, 617
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 reverse of 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 (A375137) ranks compositions matching the dashed pattern 1-32.

Examples

			Composition 89 is (2,1,3,1), which matches 2-3-1 but not 23-1.
Composition 165 is (2,3,2,1), which matches 23-1 but not 231.
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 sequence together with corresponding compositions begins:
   41: (2,3,1)
   81: (2,4,1)
   83: (2,3,1,1)
  105: (1,2,3,1)
  145: (3,4,1)
  161: (2,5,1)
  163: (2,4,1,1)
  165: (2,3,2,1)
  166: (2,3,1,2)
  167: (2,3,1,1,1)
  169: (2,2,3,1)
  209: (1,2,4,1)
  211: (1,2,3,1,1)
  233: (1,1,2,3,1)
		

Crossrefs

The complement is too dense, but counted by A189076.
The non-dashed version is A335482, reverse A335480.
For leaders of identical runs we have A335486, reverse A335485.
Compositions of this type are counted by A374636.
The reverse version is A375137, counted by A374636.
Matching 12-1 also gives A375296, 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[#],{_,y_,z_,_,x_,_}/;x
    				

A335481 Numbers k such that the k-th composition in standard order (A066099) matches the pattern (2,1,3).

Original entry on oeis.org

44, 88, 89, 92, 108, 152, 172, 176, 177, 178, 179, 180, 184, 185, 188, 216, 217, 220, 236, 296, 300, 304, 305, 312, 332, 344, 345, 348, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 364, 368, 369, 370, 371, 372, 376, 377, 380, 408, 428, 432, 433, 434, 435
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2020

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.
We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1).

Examples

			The sequence of terms together with the corresponding compositions begins:
   44: (2,1,3)
   88: (2,1,4)
   89: (2,1,3,1)
   92: (2,1,1,3)
  108: (1,2,1,3)
  152: (3,1,4)
  172: (2,2,1,3)
  176: (2,1,5)
  177: (2,1,4,1)
  178: (2,1,3,2)
  179: (2,1,3,1,1)
  180: (2,1,2,3)
  184: (2,1,1,4)
  185: (2,1,1,3,1)
  188: (2,1,1,1,3)
		

Crossrefs

The version counting permutations is A056986.
Patterns matching this pattern are counted by A335515 (by length).
Permutations of prime indices matching this pattern are counted by A335520.
These compositions are counted by A335514 (by sum).
Constant patterns are counted by A000005 and ranked by A272919.
Permutations are counted by A000142 and ranked by A333218.
Patterns are counted by A000670 and ranked by A333217.
Non-unimodal compositions are counted by A115981 and ranked by A335373.
Permutations matching (1,3,2,4) are counted by A158009.
Combinatory separations are counted by A269134.
Patterns matched by standard compositions are counted by A335454.
Minimal patterns avoided by a standard composition are counted by A335465.
Other permutations:
- A335479 (1,2,3)
- A335480 (1,3,2)
- A335481 (2,1,3)
- A335482 (2,3,1)
- A335483 (3,1,2)
- A335484 (3,2,1)

Programs

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

A335484 Numbers k such that the k-th composition in standard order (A066099) matches the pattern (3,2,1).

Original entry on oeis.org

37, 69, 75, 77, 101, 133, 137, 139, 141, 149, 150, 151, 155, 157, 165, 197, 203, 205, 229, 261, 265, 267, 269, 274, 275, 277, 278, 279, 281, 283, 285, 293, 297, 299, 300, 301, 302, 303, 309, 310, 311, 315, 317, 325, 331, 333, 357, 389, 393, 395, 397, 405, 406
Offset: 1

Views

Author

Gus Wiseman, Jun 18 2020

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.
We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1).

Examples

			The sequence of terms together with the corresponding compositions begins:
   37: (3,2,1)
   69: (4,2,1)
   75: (3,2,1,1)
   77: (3,1,2,1)
  101: (1,3,2,1)
  133: (5,2,1)
  137: (4,3,1)
  139: (4,2,1,1)
  141: (4,1,2,1)
  149: (3,2,2,1)
  150: (3,2,1,2)
  151: (3,2,1,1,1)
  155: (3,1,2,1,1)
  157: (3,1,1,2,1)
  165: (2,3,2,1)
		

Crossrefs

The version counting permutations is A056986.
Patterns matching this pattern are counted by A335515 (by length).
Permutations of prime indices matching this pattern are counted by A335520.
These compositions are counted by A335514 (by sum).
Constant patterns are counted by A000005 and ranked by A272919.
Permutations are counted by A000142 and ranked by A333218.
Patterns are counted by A000670 and ranked by A333217.
Non-unimodal compositions are counted by A115981 and ranked by A335373.
Permutations matching (1,3,2,4) are counted by A158009.
Combinatory separations are counted by A269134.
Patterns matched by standard compositions are counted by A335454.
Minimal patterns avoided by a standard composition are counted by A335465.
Other permutations:
- A335479 (1,2,3)
- A335480 (1,3,2)
- A335481 (2,1,3)
- A335482 (2,3,1)
- A335483 (3,1,2)
- A335484 (3,2,1)

Programs

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

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

Original entry on oeis.org

13, 25, 27, 29, 45, 49, 50, 51, 53, 54, 55, 57, 59, 61, 77, 82, 89, 91, 93, 97, 98, 99, 101, 102, 103, 105, 107, 108, 109, 110, 111, 113, 114, 115, 117, 118, 119, 121, 123, 125, 141, 153, 155, 157, 162, 165, 173, 177, 178, 179, 181, 182, 183, 185, 187, 189
Offset: 1

Views

Author

Gus Wiseman, Aug 12 2024

Keywords

Comments

First differs from the non-dashed version in lacking 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.
Also numbers k such that the k-th composition in standard order (row k of A066099) matches the dashed patterns 1-32 or 1-21.

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)
  45: (2,1,2,1)
  49: (1,4,1)
  50: (1,3,2)
  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)
  77: (3,1,2,1)
  82: (2,3,2)
  89: (2,1,3,1)
  91: (2,1,2,1,1)
  93: (2,1,1,2,1)
		

Crossrefs

For leaders of identical runs we have A335485.
Positions of non-strictly decreasing rows in A374629 (sums A374630).
For identical leaders we have A374633, counted by A374631.
Matching 1-32 only gives A375137, reverse A375138, both counted by A374636.
Interchanging weak/strict gives A375139, counted by A375135.
Compositions of this type are counted by A375140, complement A188920.
The reverse version is A375296.
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[stc[#],LessEqual]&]
    - or -
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Select[Range[0,100],MatchQ[stc[#],{_,x_,_,z_,y_,_}/;x<=y
    				
Showing 1-10 of 12 results. Next