login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A335457 Number of normal patterns contiguously matched by compositions of n. 25
1, 2, 5, 12, 31, 80, 196, 486, 1171, 2787, 6564, 15323, 35403, 81251, 185087, 418918, 942525, 2109143, 4695648, 10405694, 22959156 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

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).

LINKS

Table of n, a(n) for n=0..20.

Wikipedia, Permutation pattern

Gus Wiseman, Sequences counting and ranking compositions by the patterns they match or avoid.

EXAMPLE

The a(0) = 1 through a(3) = 12 pairs of a composition with a contiguously matched pattern:

  ()()  (1)()   (2)()     (3)()

        (1)(1)  (11)()    (12)()

                (2)(1)    (21)()

                (11)(1)   (3)(1)

                (11)(11)  (111)()

                          (12)(1)

                          (21)(1)

                          (111)(1)

                          (12)(12)

                          (21)(21)

                          (111)(11)

                          (111)(111)

MATHEMATICA

mstype[q_]:=q/.Table[Union[q][[i]]->i, {i, Length[Union[q]]}];

Table[Sum[Length[Union[mstype/@ReplaceList[cmp, {___, s___, ___}:>{s}]]], {cmp, Join@@Permutations/@IntegerPartitions[n]}], {n, 0, 10}]

CROSSREFS

The version for standard compositions is A335458.

The non-contiguous version is A335456.

Patterns are counted by A000670 and ranked by A333217.

The n-th standard composition has A124771(n) contiguous subsequences.

Patterns contiguously matched by prime indices are A335549.

Minimal avoided patterns of prime indices are counted by A335550.

Cf. A000005, A056986, A108917, A124767, A181796, A269134, A333224, A334299.

Sequence in context: A125023 A129804 A317882 * A290616 A110035 A000635

Adjacent sequences:  A335454 A335455 A335456 * A335458 A335459 A335460

KEYWORD

nonn,more

AUTHOR

Gus Wiseman, Jun 23 2020

EXTENSIONS

a(16)-a(20) from Jinyuan Wang, Jul 08 2020

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 24 02:18 EDT 2021. Contains 347617 sequences. (Running on oeis4.)