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 A227884 #29 May 14 2018 10:15:24 %S A227884 1,1,2,6,19,5,70,50,331,328,61,1863,2154,1023,11637,16751,10547,1385, %T A227884 81110,144840,102030,34900,635550,1314149,1109973,518607,50521, %U A227884 5495339,12735722,13046040,6858598,1781101,51590494,134159743,157195762,97348436,36004400 %N A227884 Number T(n,k) of permutations of [n] with exactly k (possibly overlapping) occurrences of the consecutive step pattern up, down, up; triangle T(n,k), n>=0, 0<=k<=max(0,floor(n/2)-1), read by rows. %H A227884 Alois P. Heinz, <a href="/A227884/b227884.txt">Rows n = 0..170, flattened</a> %e A227884 T(4,1) = 5: 1324, 1423, 2314, 2413, 3412. %e A227884 Triangle T(n,k) begins: %e A227884 : 0 : 1; %e A227884 : 1 : 1; %e A227884 : 2 : 2; %e A227884 : 3 : 6; %e A227884 : 4 : 19, 5; %e A227884 : 5 : 70, 50; %e A227884 : 6 : 331, 328, 61; %e A227884 : 7 : 1863, 2154, 1023; %e A227884 : 8 : 11637, 16751, 10547, 1385; %e A227884 : 9 : 81110, 144840, 102030, 34900; %e A227884 : 10 : 635550, 1314149, 1109973, 518607, 50521; %p A227884 b:= proc(u, o, t) option remember; `if`(u+o=0, 1, expand( %p A227884 add(b(u-j, o+j-1, [1, 3, 1][t]), j=1..u)+ %p A227884 add(b(u+j-1, o-j, 2)*`if`(t=3, x, 1), j=1..o))) %p A227884 end: %p A227884 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0, 1)): %p A227884 seq(T(n), n=0..15); %t A227884 b[u_, o_, t_] := b[u, o, t] = If[u+o==0, 1, Expand[Sum[b[u-j, o+j-1, {1, 3, 1}[[t]]], {j, 1, u}]+Sum[b[u+j-1, o-j, 2]*If[t==3, x, 1], {j, 1, o}]]]; %t A227884 T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ b[n, 0, 1]]; %t A227884 Table[T[n], {n, 0, 15}] // Flatten (* _Jean-François Alcover_, Mar 29 2017, translated from Maple *) %Y A227884 Columns k=0-1 give: A177477, A227883. %Y A227884 T(2n,n-1) gives A000364(n) for n>=2. %Y A227884 Row sums give: A000142. %Y A227884 Cf. A000111, A242783, A242784, A295987. %K A227884 nonn,tabf %O A227884 0,3 %A A227884 _Alois P. Heinz_, Oct 25 2013