A335470 Number of compositions of n matching the pattern (1,2,1).
0, 0, 0, 0, 1, 3, 9, 24, 61, 141, 322, 713, 1543, 3289, 6907, 14353, 29604, 60640, 123522, 250645, 506808, 1022197, 2057594, 4135358, 8301139, 16648165, 33364948, 66831721, 133814251, 267850803, 536026676, 1072528081, 2145745276, 4292485526, 8586405894, 17174865820
Offset: 0
Keywords
Examples
The a(4) = 1 through a(6) = 9 compositions: (121) (131) (141) (1121) (1131) (1211) (1212) (1221) (1311) (2121) (11121) (11211) (12111)
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..1000
- Wikipedia, Permutation pattern
- Gus Wiseman, Sequences counting and ranking compositions by the patterns they match or avoid.
Crossrefs
The version for prime indices is A335446.
These compositions are ranked by A335466.
The complement A335471 is the avoiding version.
The (2,1,2)-matching version is A335472.
The version for patterns is A335509.
Compositions are counted by A011782.
Combinatory separations are counted by A269134.
Patterns matched by compositions are counted by A335456.
Minimal patterns avoided by a standard composition are counted by A335465.
Compositions matching (1,2,3) are counted by A335514.
Programs
Formula
a(n > 0) = 2^(n - 1) - A335471(n).
Extensions
Terms a(21) and beyond from Andrew Howroyd, Dec 31 2020
Comments