A335472 Number of compositions of n matching the pattern (2,1,2).
0, 0, 0, 0, 0, 1, 3, 9, 25, 66, 165, 394, 914, 2068, 4607, 10093, 21818, 46592, 98498, 206452, 429670, 888818, 1829005, 3746802, 7645511, 15549306, 31534322, 63800562, 128823111, 259678348, 522715526, 1050957282, 2110953835, 4236623798, 8497083721, 17032615177
Offset: 0
Keywords
Examples
The a(5) = 1 through a(7) = 9 compositions: (212) (1212) (313) (2112) (2122) (2121) (2212) (11212) (12112) (12121) (21112) (21121) (21211)
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 version for prime indices is A335453.
These compositions are ranked by A335468.
The (1,2,1)-matching version is A335470.
The complement A335473 is the avoiding version.
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) - A335473(n).
Comments