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 A152667 #18 Sep 24 2024 11:05:20 %S A152667 2,6,12,12,48,72,144,432,144,720,2880,1440,2880,17280,17280,2880, %T A152667 17280,129600,172800,43200,86400,864000,1728000,864000,86400,604800, %U A152667 7257600,18144000,12096000,1814400,3628800,54432000,181440000,181440000,54432000,3628800 %N A152667 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k runs of even entries (n >= 2, 1 <= k <= floor(n/2)). For example, the permutation 321756498 has 3 runs of even entries: 2, 64 and 8. %C A152667 Sum of entries in row n is n! (=A000142(n)). Row n contains floor(n/2) entries. %C A152667 T(n,1) = A152873(n). %C A152667 Sum_{k>=1} k*T(n,k) = A152668(n). %C A152667 Mirror image of A145892. %F A152667 T(2n,k) = (n!)^2 * binomial(n+1,k) binomial(n-1,k-1); %F A152667 T(2n+1,k) = n!*(n+1)!*binomial(n-1,k-1)*binomial(n+2,k) (n >= 1). %e A152667 T(4,2) = 12 because we have 1234, 3214, 1432, 3412, 2134, 2314 and their reverses. %e A152667 Triangle starts: %e A152667 2; %e A152667 6; %e A152667 12, 12; %e A152667 48, 72; %e A152667 144, 432, 144; %e A152667 720, 2880, 1440; %p A152667 ae := proc (n, k) options operator, arrow: factorial(n)^2*binomial(n+1, k)*binomial(n-1, k-1) end proc: ao := proc (n, k) options operator, arrow: factorial(n)*factorial(n+1)*binomial(n-1, k-1)*binomial(n+2, k) end proc: T := proc (n, k) if `mod`(n, 2) = 0 then ae((1/2)*n, k) else ao((1/2)*n-1/2, k) end if end proc; for n to 12 do seq(T(n, k), k = 1 .. floor((1/2)*n)) end do; # yields sequence in triangular form %t A152667 T[n_, k_] := If[EvenQ[n], ((n/2)!)^2*Binomial[n/2+1, k]*Binomial[n/2-1, k-1], ((n-1)/2)!*((n-1)/2+1)!*Binomial[(n-1)/2-1, k-1]*Binomial[(n-1)/2+2, k]]; %t A152667 Table[T[n, k], {n, 2, 12}, {k, 1, Floor[n/2]}] // Flatten (* _Jean-François Alcover_, Sep 24 2024 *) %Y A152667 Cf. A000142, A152666, A152668, A145892, A152873. %K A152667 nonn,tabf %O A152667 2,1 %A A152667 _Emeric Deutsch_, Dec 14 2008