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 A180194 #6 May 19 2024 08:11:01 %S A180194 1,1,1,1,4,2,13,10,1,63,48,9,356,293,68,3,2403,2036,557,44,18655, %T A180194 16213,4902,539,11,163988,145068,47203,6356,265,1608667,1442858, %U A180194 495710,76833,4679,53,17415725,15792362,5659377,971992,75490,1854,206202408 %N A180194 Triangle read by rows: T(n,k) is the number of permutations of [n] having k blocks of even length. %C A180194 A block of a permutation is a maximal sequence of consecutive integers which appear in consecutive positions. For example, the permutation 5412367 has 4 blocks: 5, 4, 123, and 67. %C A180194 Number of entries in row n is 1+floor(n/2). %H A180194 A. N. Myers, <a href="https://doi.org/10.1006/jcta.2002.3279">Counting permutations by their rigid patterns</a>, J. Combin. Theory, Series A, Vol. 99, No. 2 (2002), pp. 345-357. %F A180194 T(n,k) = Sum(binomial(k+2i,k)*binomial(n/2+i-1,k+2i-1)*[d(k+2i)+d(k+2i-1)], i=0..n/2-k) if n is even, %F A180194 T(n,k) = Sum(binomial(k+2i+1,k)*binomial(n/2-1/2+i,k+2i)*[d(k+2i+1)+d(k+2i)], i=0..n/2-1/2-k) if n is odd, %F A180194 Here d(i)=A000166(i) are the derangement numbers. %F A180194 Sum of entries in row n = n! = A000142(n). %F A180194 T(2n,n) = d(n)+d(n-1) = A000255(n-1), where d(i)=A000166(n) are the derangement numbers. %F A180194 T(2n+1,n) = d(n+2). %F A180194 Sum(k*T(n,k), k>=0) = A180195(n-1). %e A180194 T(3,1)=2 because we have (23)1 and 3(12) (the blocks of even length are shown between parentheses). %e A180194 Triangle starts: %e A180194 1; %e A180194 1; %e A180194 1,1; %e A180194 4,2; %e A180194 13,10,1; %e A180194 63,48,9; %e A180194 356,293,68,3; %p A180194 d[ -1] := 0: d[0] := 1: for n to 50 do d[n] := n*d[n-1]+(-1)^n end do: T := proc (n, k) if `mod`(n, 2) = 0 then sum(binomial(k+2*i, k)*binomial((1/2)*n+i-1, k+2*i-1)*(d[k+2*i]+d[k+2*i-1]), i = 0 .. (1/2)*n-k) else sum(binomial(k+2*i+1, k)*binomial((1/2)*n+i-1/2, k+2*i)*(d[k+2*i+1]+d[k+2*i]), i = 0 .. (1/2)*n-1/2-k) end if end proc: for n from 0 to 12 do seq(T(n, k), k = 0 .. floor((1/2)*n)) end do; # yields sequence in triangular form %Y A180194 Cf. A000166, A000255, A180193, A180195 %K A180194 nonn,tabf %O A180194 0,5 %A A180194 _Emeric Deutsch_, Sep 09 2010