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 A152664 #8 Jul 21 2017 10:50:19 %S A152664 1,1,1,4,2,12,8,4,72,36,12,360,216,108,36,2880,1440,576,144,20160, %T A152664 11520,5760,2304,576,201600,100800,43200,14400,2880,1814400,1008000, %U A152664 504000,216000,72000,14400,21772800,10886400,4838400,1814400,518400,86400 %N A152664 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} for which k is the maximal number of initial even entries (0 <= k <= floor(n/2)). %C A152664 Sum of entries in row n is n! (A000142). %C A152664 Row n has 1 + floor(n/2) entries. %C A152664 T(n,0) = A052558(n-1). %C A152664 Sum_{k=0..ceiling(n/2)} k*T(n,k) = A152665(n). %F A152664 T(2n+1,k) = n!(n+1)!binomial(2*n-k,n); %F A152664 T(2n,k) = (n!)^2*binomial(2n-k-1,n-1). %e A152664 T(3,0)=4 because we have 123, 132, 312 and 321. %e A152664 T(4,2)=4 because we have 2413, 2431, 4213 and 4231. %e A152664 Triangle starts: %e A152664 1; %e A152664 1, 1; %e A152664 4, 2; %e A152664 12, 8, 4; %e A152664 72, 36, 12; %e A152664 360, 216, 108, 36; %p A152664 T := proc (n, k) if `mod`(n, 2) = 1 then factorial((1/2)*n-1/2)*factorial((1/2)*n+1/2)*binomial(n-k-1, (1/2)*n-1/2) else factorial((1/2)*n)^2*binomial(n-k-1, (1/2)*n-1) end if end proc: for n to 11 do seq(T(n, k), k = 0 .. floor((1/2)*n)) end do; # yields sequence in triangular form %Y A152664 Cf. A000142, A052558, A152662, A152665. %K A152664 nonn,tabf %O A152664 1,4 %A A152664 _Emeric Deutsch_, Dec 13 2008