cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A335514 Number of (1,2,3)-matching compositions of n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Jun 22 2020

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)
		

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.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],MatchQ[#,{_,x_,_,y_,_,z_,_}/;x
    				

Formula

a(n > 0) = 2^(n - 1) - A102726(n).

Extensions

Terms a(21) and beyond from Andrew Howroyd, Dec 31 2020