%I #14 Jul 08 2020 10:22:41
%S 1,2,5,12,31,80,196,486,1171,2787,6564,15323,35403,81251,185087,
%T 418918,942525,2109143,4695648,10405694,22959156
%N Number of normal patterns contiguously matched by compositions of n.
%C We define a (normal) 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).
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Permutation_pattern">Permutation pattern</a>
%H Gus Wiseman, <a href="/A102726/a102726.txt">Sequences counting and ranking compositions by the patterns they match or avoid.</a>
%e The a(0) = 1 through a(3) = 12 pairs of a composition with a contiguously matched pattern:
%e ()() (1)() (2)() (3)()
%e (1)(1) (11)() (12)()
%e (2)(1) (21)()
%e (11)(1) (3)(1)
%e (11)(11) (111)()
%e (12)(1)
%e (21)(1)
%e (111)(1)
%e (12)(12)
%e (21)(21)
%e (111)(11)
%e (111)(111)
%t mstype[q_]:=q/.Table[Union[q][[i]]->i,{i,Length[Union[q]]}];
%t Table[Sum[Length[Union[mstype/@ReplaceList[cmp,{___,s___,___}:>{s}]]],{cmp,Join@@Permutations/@IntegerPartitions[n]}],{n,0,10}]
%Y The version for standard compositions is A335458.
%Y The non-contiguous version is A335456.
%Y Patterns are counted by A000670 and ranked by A333217.
%Y The n-th standard composition has A124771(n) contiguous subsequences.
%Y Patterns contiguously matched by prime indices are A335549.
%Y Minimal avoided patterns of prime indices are counted by A335550.
%Y Cf. A000005, A056986, A108917, A124767, A181796, A269134, A333224, A334299.
%K nonn,more
%O 0,2
%A _Gus Wiseman_, Jun 23 2020
%E a(16)-a(20) from _Jinyuan Wang_, Jul 08 2020