A335514 Number of (1,2,3)-matching compositions of n.
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
Keywords
Examples
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)
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..500
- Gus Wiseman, Sequences counting and ranking compositions by the patterns they match or avoid.
Crossrefs
Programs
Formula
a(n > 0) = 2^(n - 1) - A102726(n).
Extensions
Terms a(21) and beyond from Andrew Howroyd, Dec 31 2020