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.
%I A335472 #13 Dec 31 2020 15:36:30 %S A335472 0,0,0,0,0,1,3,9,25,66,165,394,914,2068,4607,10093,21818,46592,98498, %T A335472 206452,429670,888818,1829005,3746802,7645511,15549306,31534322, %U A335472 63800562,128823111,259678348,522715526,1050957282,2110953835,4236623798,8497083721,17032615177 %N A335472 Number of compositions of n matching the pattern (2,1,2). %C A335472 Also the number of (1,2,2) or (2,2,1)-matching compositions. %C A335472 We define a pattern to be a finite sequence covering an initial interval of positive integers. Patterns are counted by A000670 and ranked by A333217. A sequence S is said to match a pattern P if there is a not necessarily contiguous subsequence of S whose parts have the same relative order as P. For example, (3,1,1,3) matches (1,1,2), (2,1,1), and (2,1,2), but avoids (1,2,1), (1,2,2), and (2,2,1). %C A335472 A composition of n is a finite sequence of positive integers summing to n. %H A335472 Andrew Howroyd, <a href="/A335472/b335472.txt">Table of n, a(n) for n = 0..200</a> %H A335472 Wikipedia, <a href="https://en.wikipedia.org/wiki/Permutation_pattern">Permutation pattern</a> %H A335472 Gus Wiseman, <a href="https://oeis.org/A102726/a102726.txt">Sequences counting and ranking compositions by the patterns they match or avoid.</a> %F A335472 a(n > 0) = 2^(n - 1) - A335473(n). %e A335472 The a(5) = 1 through a(7) = 9 compositions: %e A335472 (212) (1212) (313) %e A335472 (2112) (2122) %e A335472 (2121) (2212) %e A335472 (11212) %e A335472 (12112) %e A335472 (12121) %e A335472 (21112) %e A335472 (21121) %e A335472 (21211) %t A335472 Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],MatchQ[#,{___,x_,___,y_,___,x_,___}/;x>y]&]],{n,0,10}] %Y A335472 The version for prime indices is A335453. %Y A335472 These compositions are ranked by A335468. %Y A335472 The (1,2,1)-matching version is A335470. %Y A335472 The complement A335473 is the avoiding version. %Y A335472 The version for patterns is A335509. %Y A335472 Constant patterns are counted by A000005 and ranked by A272919. %Y A335472 Patterns are counted by A000670 and ranked by A333217. %Y A335472 Permutations are counted by A000142 and ranked by A333218. %Y A335472 Compositions are counted by A011782. %Y A335472 Non-unimodal compositions are counted by A115981 and ranked by A335373. %Y A335472 Combinatory separations are counted by A269134. %Y A335472 Patterns matched by compositions are counted by A335456. %Y A335472 Minimal patterns avoided by a standard composition are counted by A335465. %Y A335472 Compositions matching (1,2,3) are counted by A335514. %Y A335472 Cf. A261982, A034691, A056986, A106356, A238279, A333755. %K A335472 nonn %O A335472 0,7 %A A335472 _Gus Wiseman_, Jun 17 2020