login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A335514
Number of (1,2,3)-matching compositions of n.
21
0, 0, 0, 0, 0, 0, 1, 4, 14, 42, 114, 292, 714, 1686, 3871, 8696, 19178, 41667, 89386, 189739, 399144, 833290, 1728374, 3565148, 7319212, 14965880, 30496302, 61961380, 125577752, 253971555, 512716564, 1033496947, 2080572090, 4183940550, 8406047907, 16875834728
OFFSET
0,8
FORMULA
a(n > 0) = 2^(n - 1) - A102726(n).
EXAMPLE
The a(6) = 1 through a(8) = 14 compositions:
(1,2,3) (1,2,4) (1,2,5)
(1,1,2,3) (1,3,4)
(1,2,1,3) (1,1,2,4)
(1,2,3,1) (1,2,1,4)
(1,2,2,3)
(1,2,3,2)
(1,2,4,1)
(2,1,2,3)
(1,1,1,2,3)
(1,1,2,1,3)
(1,1,2,3,1)
(1,2,1,1,3)
(1,2,1,3,1)
(1,2,3,1,1)
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], MatchQ[#, {___, x_, ___, y_, ___, z_, ___}/; x<y<z]&]], {n, 0, 10}]
CROSSREFS
The version for permutations is A056986.
The avoiding version is A102726.
These compositions are ranked by A335479.
The version for patterns is A335515.
The version for prime indices is A335520.
Permutations are counted by A000142 and ranked by A333218.
Patterns are counted by A000670 and ranked by A333217.
Patterns matched by compositions are counted by A335456.
Sequence in context: A295201 A309296 A124616 * A221058 A347583 A124617
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 22 2020
EXTENSIONS
Terms a(21) and beyond from Andrew Howroyd, Dec 31 2020
STATUS
approved