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.

Previous Showing 11-20 of 21 results. Next

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

Original entry on oeis.org

50, 98, 101, 102, 114, 178, 194, 196, 197, 198, 202, 203, 205, 206, 210, 226, 229, 230, 242, 306, 324, 354, 357, 358, 370, 386, 388, 389, 390, 393, 394, 395, 396, 397, 398, 402, 404, 405, 406, 407, 410, 411, 413, 414, 418, 421, 422, 434, 450, 452, 453, 454
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:
   50: (1,3,2)
   98: (1,4,2)
  101: (1,3,2,1)
  102: (1,3,1,2)
  114: (1,1,3,2)
  178: (2,1,3,2)
  194: (1,5,2)
  196: (1,4,3)
  197: (1,4,2,1)
  198: (1,4,1,2)
  202: (1,3,2,2)
  203: (1,3,2,1,1)
  205: (1,3,1,2,1)
  206: (1,3,1,1,2)
  210: (1,2,3,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_,_}/;x
    				

A350252 Number of non-alternating patterns of length n.

Original entry on oeis.org

0, 0, 1, 7, 53, 439, 4121, 43675, 519249, 6867463, 100228877, 1602238783, 27866817297, 524175098299, 10606844137009, 229807953097903, 5308671596791901, 130261745042452855, 3383732450013895721, 92770140175473602755, 2677110186541556215233
Offset: 0

Views

Author

Gus Wiseman, Jan 13 2022

Keywords

Comments

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 is alternating if it is alternately strictly increasing and strictly decreasing, starting with either. For example, the partition (3,2,2,2,1) has no alternating permutations, even though it does have the anti-run permutations (2,3,2,1,2) and (2,1,2,3,2). An alternating pattern is necessarily an anti-run (A005649).
Conjecture: Also the number of non-weakly up/down (or down/up) patterns of length n. For example:
- The a(3) = 7 non-weakly up/down patterns:
(121), (122), (123), (132), (221), (231), (321)
- The a(3) = 7 non-weakly down/up patterns:
(112), (123), (211), (212), (213), (312), (321)
- The a(3) = 7 non-alternating patterns (see example for more):
(111), (112), (122), (123), (211), (221), (321)

Examples

			The a(2) = 1 and a(3) = 7 non-alternating patterns:
  (1,1)  (1,1,1)
         (1,1,2)
         (1,2,2)
         (1,2,3)
         (2,1,1)
         (2,2,1)
         (3,2,1)
The a(4) = 53 non-alternating patterns:
  2112   3124   4123   1112   2134   1234   3112   2113   1123
  2211   3214   4213   1211   2314   1243   3123   2123   1213
  2212   3412   4312   1212   2341   1324   3211   2213   1223
         3421   4321   1221   2413   1342   3212   2311   1231
                       1222   2431   1423   3213   2312   1232
                                     1432   3312   2313   1233
                                            3321   2321   1312
                                                   2331   1321
                                                          1322
                                                          1323
                                                          1332
		

Crossrefs

The unordered version is A122746.
The version for compositions is A345192, ranked by A345168, weak A349053.
The complement is counted by A345194, weak A349058.
The version for factorizations is A348613, complement A348610, weak A350139.
The strict case (permutations) is A348615, complement A001250.
The weak version for partitions is A349061, complement A349060.
The weak version for perms of prime indices is A349797, complement A349056.
The weak version is A350138.
The version for perms of prime indices is A350251, complement A345164.
A000670 = patterns (ranked by A333217).
A003242 = anti-run compositions, complement A261983, ranked by A333489.
A005649 = anti-run patterns, complement A069321.
A019536 = necklace patterns.
A025047/A129852/A129853 = alternating compositions, ranked by A345167.
A226316 = patterns avoiding (1,2,3), weakly A052709, complement A335515.
A345163 = normal partitions w/ alternating permutation, complement A345162.
A345170 = partitions w/ alternating permutation, complement A345165.
A349055 = normal multisets w/ alternating permutation, complement A349050.

Programs

  • Mathematica
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    wigQ[y_]:=Or[Length[y]==0,Length[Split[y]]==Length[y]&& Length[Split[Sign[Differences[y]]]]==Length[y]-1];
    Table[Length[Select[Join@@Permutations/@allnorm[n],!wigQ[#]&]],{n,0,6}]

Formula

a(n) = A000670(n) - A345194(n).

Extensions

Terms a(9) and beyond from Andrew Howroyd, Feb 04 2022

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
    				

A350354 Number of up/down (or down/up) patterns of length n.

Original entry on oeis.org

1, 1, 1, 3, 11, 51, 281, 1809, 13293, 109899, 1009343, 10196895, 112375149, 1341625041, 17249416717, 237618939975, 3491542594727, 54510993341523, 901106621474801, 15723571927404189, 288804851413993941, 5569918636750820751, 112537773142244706427
Offset: 0

Views

Author

Gus Wiseman, Jan 16 2022

Keywords

Comments

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 patten is up/down if it is alternately strictly increasing and strictly decreasing, starting with an increase.
A pattern is up/down if it is alternately strictly increasing and strictly decreasing, starting with an increase. For example, the partition (3,2,2,2,1) has no up/down permutations, even though it does have the anti-run permutation (2,3,2,1,2).
Conjecture: Also the half the number of weakly up/down patterns of length n.
These are the values of the Euler zig-zag polynomials A205497 evaluated at x = 1/2 and normalized by 2^n. - Peter Luschny, Jun 03 2024

Examples

			The a(0) = 1 through a(4) = 11 patterns:
  ()  (1)  (1,2)  (1,2,1)  (1,2,1,2)
                  (1,3,2)  (1,2,1,3)
                  (2,3,1)  (1,3,1,2)
                           (1,3,2,3)
                           (1,3,2,4)
                           (1,4,2,3)
                           (2,3,1,2)
                           (2,3,1,3)
                           (2,3,1,4)
                           (2,4,1,3)
                           (3,4,1,2)
		

Crossrefs

The version for permutations is A000111, undirected A001250.
For compositions we have A025048, down/up A025049, undirected A025047.
This is the up/down (or down/up) case of A345194.
A205497 are the Euler zig-zag polynomials.
A000670 counts patterns, ranked by A333217.
A005649 counts anti-run patterns.
A019536 counts necklace patterns.
A226316 counts patterns avoiding (1,2,3), weakly A052709.
A335515 counts patterns matching (1,2,3).
A349058 counts weakly alternating patterns.
A350252 counts non-alternating patterns.
Row sums of A079502.

Programs

  • Maple
    # Using the recurrence by Kyle Petersen from A205497.
    G := proc(n) option remember; local F;
    if n = 0 then 1/(1 - q*x) else F := G(n - 1);
    simplify((p/(p - q))*(subs({p = q, q = p}, F) - subs(p = q, F))) fi end:
    A350354 := n -> 2^n*subs({p = 1, q = 1, x = 1/2}, G(n)*(1 - x)^(n + 1)):
    seq(A350354(n), n = 0..22);  # Peter Luschny, Jun 03 2024
  • Mathematica
    allnorm[n_]:=If[n<=0,{{}},Function[s, Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    updoQ[y_]:=And@@Table[If[EvenQ[m],y[[m]]>y[[m+1]],y[[m]]
    				
  • PARI
    F(p,x) = {sum(k=0, p, (-1)^((k+1)\2)*binomial((p+k)\2, k)*x^k)}
    R(n,k) = {Vec(if(k==1, 0, F(k-2,-x)/F(k-1,x)-1) + x + O(x*x^n))}
    seq(n)= {concat([1], sum(k=1, n, R(n, k)*sum(r=k, n, binomial(r, k)*(-1)^(r-k)) ))} \\ Andrew Howroyd, Feb 04 2022

Formula

a(n > 2) = A344605(n)/2.
a(n > 1) = A345194(n)/2.

Extensions

Terms a(10) and beyond from Andrew Howroyd, Feb 04 2022

A335509 Number of patterns of length n matching the pattern (1,1,2).

Original entry on oeis.org

0, 0, 0, 1, 15, 181, 2163, 27133, 364395, 5272861, 82289163, 1383131773, 24978057195, 483269202781, 9987505786443, 219821796033853, 5137810967933355, 127169580176271901, 3324712113052429323, 91585136315240091133, 2652142325158529483115, 80562824634615270041821
Offset: 0

Views

Author

Gus Wiseman, Jun 18 2020

Keywords

Comments

Also the number of (1,2,1)-matching patterns of length n.
Also the number of (2,1,2)-matching patterns of length n.
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 a(3) = 1 through a(4) = 15 patterns:
  (1,1,2)  (1,1,1,2)
           (1,1,2,1)
           (1,1,2,2)
           (1,1,2,3)
           (1,1,3,2)
           (1,2,1,2)
           (1,2,1,3)
           (1,2,2,3)
           (1,3,1,2)
           (2,1,1,2)
           (2,1,1,3)
           (2,1,2,3)
           (2,2,1,3)
           (2,2,3,1)
           (3,1,1,2)
		

Crossrefs

The complement A001710 is the avoiding version.
Compositions matching this pattern are counted by A335470 and ranked by A335476.
Permutations of prime indices matching this pattern are counted by A335446.
Patterns are counted by A000670 and ranked by A333217.
Patterns matching the pattern (1,1) are counted by A019472.
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.
Patterns matching (1,2,3) are counted by A335515.

Programs

  • Mathematica
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Join@@Permutations/@allnorm[n],MatchQ[#,{_,x_,_,x_,_,y_,_}/;x
    				
  • PARI
    seq(n)={Vec(serlaplace(1/(2-exp(x + O(x*x^n))) - (2-2*x+x^2)/(2*(1-x)^2)), -(n+1))} \\ Andrew Howroyd, Dec 31 2020

Formula

E.g.f.: 1/(2-exp(x)) - (2-2*x+x^2)/(2*(1-x)^2). - Andrew Howroyd, Dec 31 2020

Extensions

Terms a(10) and beyond from Andrew Howroyd, Dec 31 2020

A335520 Number of (1,2,3)-matching permutations of the prime indices of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 3, 0, 0, 0
Offset: 1

Views

Author

Gus Wiseman, Jun 19 2020

Keywords

Comments

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 a(n) permutations for n = 30, 60, 120, 210, 180, 480:
  (123)  (1123)  (11123)  (1234)  (11223)  (1111123)
         (1213)  (11213)  (1243)  (11232)  (1111213)
         (1231)  (11231)  (1324)  (12123)  (1111231)
                 (12113)  (1342)  (12132)  (1112113)
                 (12131)  (1423)  (12213)  (1112131)
                 (12311)  (2134)  (12231)  (1112311)
                          (2314)  (12312)  (1121113)
                          (2341)  (12321)  (1121131)
                          (3124)  (21123)  (1121311)
                          (4123)  (21213)  (1123111)
                                  (21231)  (1211113)
                                           (1211131)
                                           (1211311)
                                           (1213111)
                                           (1231111)
		

Crossrefs

Positions of nonzero terms are A000977.
These permutations are ranked by A335479.
These compositions are counted by A335514.
Patterns matching this pattern are counted by A335515.
The complement A335521 is the avoiding version.
Permutations of prime indices are counted by A008480.
Patterns are counted by A000670 and ranked by A333217.
Anti-run permutations of prime indices are counted by A335452.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Length[Select[Permutations[primeMS[n]],MatchQ[#,{_,x_,_,y_,_,z_,_}/;x
    				

Formula

For n > 0, a(n) + A335521(n) = A008480(n).

A002051 Steffensen's bracket function [n,2].

Original entry on oeis.org

0, 0, 1, 9, 67, 525, 4651, 47229, 545707, 7087005, 102247051, 1622631549, 28091565547, 526858344285, 10641342962251, 230283190961469, 5315654681948587, 130370767029070365, 3385534663256714251, 92801587319328148989, 2677687796244383678827, 81124824998504072833245, 2574844419803190382447051
Offset: 1

Views

Author

Keywords

Comments

a(n) is the number of ways to arrange the blocks of the partitions of {1,2,...,n} in an undirected cycle of length 3 or more, see A000629. - Geoffrey Critzer, Nov 23 2012
From Gus Wiseman, Jun 24 2020: (Start)
Also the number of (1,2)-matching length-n sequences covering an initial interval of positive integers. For example, the a(2) = 1 and a(3) = 9 sequences are:
(1,2) (1,1,2)
(1,2,1)
(1,2,2)
(1,2,3)
(1,3,2)
(2,1,2)
(2,1,3)
(2,3,1)
(3,1,2)
Missing from this list are:
(1,1) (1,1,1)
(2,1) (2,1,1)
(2,2,1)
(3,2,1)
(End)

Examples

			a(4) = 9. There are 6 partitions of {1,2,3,4} into exactly three blocks and one way to put them in an undirected cycle of length three. There is one partition of {1,2,3,4} into four blocks and 3 ways to make an undirected cycle of length four. 6 + 3 = 9. - _Geoffrey Critzer_, Nov 23 2012
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Steffensen, J. F. Interpolation. 2d ed. Chelsea Publishing Co., New York, N. Y., 1950. ix+248 pp. MR0036799 (12,164d)

Crossrefs

A diagonal of the triangular array in A241168.
(1,2)-avoiding patterns are counted by A011782.
(1,1)-matching patterns are counted by A019472.
(1,2)-matching permutations are counted by A033312.
(1,2)-matching compositions are counted by A056823.
(1,2)-matching permutations of prime indices are counted by A335447.
(1,2)-matching compositions are ranked by A335485.
Patterns are counted by A000670 and ranked by A333217.
Patterns matched by compositions are counted by A335456.

Programs

  • Mathematica
    a[n_] := Sum[ k!*StirlingS2[n-1, k], {k, 0, n-1}] - 2^(n-2); Table[a[n], {n, 3, 17}] (* Jean-François Alcover, Nov 18 2011, after Manfred Goebel *)
    allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
    Table[Length[Select[Join@@Permutations/@allnorm[n],!GreaterEqual@@#&]],{n,0,5}] (* Gus Wiseman, Jun 24 2020 *)
  • PARI
    a(n) = sum(s=2, n-1, stirling(n,s+1,2)*s!/2); \\ Michel Marcus, Jun 24 2020

Formula

[n,2] = Sum_{s=2..n-1} Stirling2(n,s+1)*s!/2 (cf. A241168).
a(1)=0; for n >= 2, a(n) = A000670(n-1) - 2^(n-2). - Manfred Goebel (mkgoebel(AT)essex.ac.uk), Feb 20 2000; formula adjusted by N. J. A. Sloane, Apr 22 2014. For example, a(5) = 67 = A000670(4)-2^3 = 75-8 = 67.
E.g.f.: (1 - exp(2*x) - 2*log(2 - exp(x)))/4 = B(A(x)) where A(x) = exp(x)-1 and B(x) = (log(1/(1-x))- x - x^2/2)/2. - Geoffrey Critzer, Nov 23 2012

Extensions

Entry revised by N. J. A. Sloane, Apr 22 2014

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
    				

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
    				
Previous Showing 11-20 of 21 results. Next