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 A010028 #25 Jul 26 2022 03:04:47 %S A010028 1,1,0,1,2,0,1,5,5,1,1,8,24,20,7,1,11,60,128,115,45,1,14,113,444,835, %T A010028 790,323,1,17,183,1099,3599,6423,6217,2621,1,20,270,2224,11060,32484, %U A010028 56410,55160,23811,1,23,374,3950,27152,118484,325322,554306,545135,239653 %N A010028 Triangle read by rows: T(n,k) is one-half the number of permutations of length n with exactly n-k rising or falling successions, for n >= 1, 1 <= k <= n. T(1,1) = 1 by convention. %C A010028 (1/2) times number of permutations of 12...n such that exactly n-k of the following occur: 12, 23, ..., (n-1)n, 21, 32, ..., n(n-1). %D A010028 F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263. %H A010028 Alois P. Heinz, <a href="/A010028/b010028.txt">Rows n = 1..141, flattened</a> %H A010028 J. Riordan, <a href="http://projecteuclid.org/euclid.aoms/1177700181">A recurrence for permutations without rising or falling successions</a>, Ann. Math. Statist. 36 (1965), 708-710. %F A010028 For n>1, coefficient of t^(n-k) in S[n](t) defined in A002464, divided by 2. %e A010028 Triangle T(n,k) begins: %e A010028 1; %e A010028 1, 0; %e A010028 1, 2, 0; %e A010028 1, 5, 5, 1; %e A010028 1, 8, 24, 20, 7; %e A010028 1, 11, 60, 128, 115, 45; %e A010028 1, 14, 113, 444, 835, 790, 323; %e A010028 1, 17, 183, 1099, 3599, 6423, 6217, 2621; %e A010028 ... %p A010028 S:= proc(n) option remember; `if`(n<4, [1, 1, 2*t, 4*t+2*t^2] %p A010028 [n+1], expand((n+1-t)*S(n-1) -(1-t)*(n-2+3*t)*S(n-2) %p A010028 -(1-t)^2*(n-5+t)*S(n-3) +(1-t)^3*(n-3)*S(n-4))) %p A010028 end: %p A010028 T:= (n, k)-> ceil(coeff(S(n), t, n-k)/2): %p A010028 seq(seq(T(n, k), k=1..n), n=1..12); # _Alois P. Heinz_, Dec 21 2012 %t A010028 S[n_] := S[n] = If[n<4, {1, 1, 2*t, 4*t+2*t^2}[[n+1]], Expand[(n+1-t)*S[n-1] - (1-t)*(n-2+3*t)*S[n-2]-(1-t)^2*(n-5+t)*S[n-3] + (1-t)^3*(n-3)*S[n-4]]]; T[n_, k_] := Ceiling[Coefficient[S[n], t, n-k]/2]; Table[Table[T[n, k], {k, 1, n}], {n, 1, 12}] // Flatten (* _Jean-François Alcover_, Jan 14 2014, translated from _Alois P. Heinz_'s Maple code *) %Y A010028 Diagonals give A001266 (and A002464), A000130, A000349, A001267, A001268. %Y A010028 Triangle in A086856 transposed. Cf. A001100. %Y A010028 Row sums give A001710. %K A010028 tabl,nonn %O A010028 1,5 %A A010028 _N. J. A. Sloane_