The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A335509 Number of patterns of length n matching the pattern (1,1,2). 10
 0, 0, 0, 1, 15, 181, 2163, 27133, 364395, 5272861, 82289163, 1383131773, 24978057195, 483269202781, 9987505786443, 219821796033853, 5137810967933355, 127169580176271901, 3324712113052429323, 91585136315240091133, 2652142325158529483115, 80562824634615270041821 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,5 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). 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. FORMULA E.g.f.: 1/(2-exp(x)) - (2-2*x+x^2)/(2*(1-x)^2). - Andrew Howroyd, Dec 31 2020 EXAMPLE 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) 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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified July 14 15:42 EDT 2024. Contains 374322 sequences. (Running on oeis4.)