A335509 Number of patterns of length n matching the pattern (1,1,2).
0, 0, 0, 1, 15, 181, 2163, 27133, 364395, 5272861, 82289163, 1383131773, 24978057195, 483269202781, 9987505786443, 219821796033853, 5137810967933355, 127169580176271901, 3324712113052429323, 91585136315240091133, 2652142325158529483115, 80562824634615270041821
Offset: 0
Keywords
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)
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..200
- Wikipedia, Permutation pattern
- Gus Wiseman, Sequences counting and ranking compositions by the patterns they match or avoid.
Crossrefs
The complement A001710 is the avoiding version.
Permutations of prime indices matching this pattern are counted by A335446.
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
Comments