A335515 Number of patterns of length n matching the pattern (1,2,3).
0, 0, 0, 1, 19, 257, 3167, 38909, 498235, 6811453, 100623211, 1612937661, 28033056683, 526501880989, 10639153638795, 230269650097469, 5315570416909995, 130370239796988957, 3385531348514480651, 92801566389186549245, 2677687663571344712043, 81124824154544921317597
Offset: 0
Keywords
Examples
The a(3) = 1 through a(4) = 19 patterns: (1,2,3) (1,1,2,3) (1,2,1,3) (1,2,2,3) (1,2,3,1) (1,2,3,2) (1,2,3,3) (1,2,3,4) (1,2,4,3) (1,3,2,3) (1,3,2,4) (1,3,4,2) (1,4,2,3) (2,1,2,3) (2,1,3,4) (2,3,1,4) (2,3,4,1) (3,1,2,3) (3,1,2,4) (4,1,2,3)
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 A226316 is the avoiding version.
Permutations of prime indices matching this pattern are counted by A335520.
Patterns matching the pattern (1,1) are counted by A019472.
Permutations matching (1,2,3) are counted by A056986.
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.
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_,_,y_,_,z_,_}/;x
-
PARI
seq(n)=Vec( serlaplace(1/(2-exp(x + O(x*x^n)))) - 1/2 - 1/(1+sqrt(1-8*x+8*x^2 + O(x*x^n))), -(n+1)) \\ Andrew Howroyd, Jan 28 2024
Formula
Extensions
a(9) onwards from Andrew Howroyd, Jan 28 2024
Comments