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 A097591 #28 Feb 22 2024 20:26:44 %S A097591 1,0,1,1,0,1,0,5,0,1,6,0,17,0,1,0,70,0,49,0,1,90,0,500,0,129,0,1,0, %T A097591 1890,0,2828,0,321,0,1,2520,0,23100,0,13930,0,769,0,1,0,83160,0, %U A097591 215292,0,62634,0,1793,0,1,113400,0,1549800,0,1697430,0,264072,0,4097,0,1 %N A097591 Triangle read by rows: T(n,k) is the number of permutations of [n] with exactly k increasing runs of odd length. %H A097591 Alois P. Heinz, <a href="/A097591/b097591.txt">Rows n = 0..140, flattened</a> %F A097591 E.g.f.: t^2/[1-tx-(1-t^2)exp(-tx)]. %F A097591 Sum_{k=1..n} k * T(n,k) = A096654(n-1) for n > 0. - _Alois P. Heinz_, Jul 03 2019 %e A097591 Triangle starts: %e A097591 1; %e A097591 0, 1; %e A097591 1, 0, 1; %e A097591 0, 5, 0, 1; %e A097591 6, 0, 17, 0, 1; %e A097591 0, 70, 0, 49, 0, 1; %e A097591 90, 0, 500, 0, 129, 0, 1; %e A097591 0, 1890, 0, 2828, 0, 321, 0, 1; %e A097591 2520, 0, 23100, 0, 13930, 0, 769, 0, 1; %e A097591 ... %e A097591 Row n has n+1 entries. %e A097591 Example: T(3,1) = 5 because we have (123), 13(2), (2)13, 23(1) and (3)12 (the runs of odd length are shown between parentheses). %p A097591 G:=t^2/(1-t*x-(1-t^2)*exp(-t*x)): Gser:=simplify(series(G,x=0,12)): P[0]:=1: for n from 1 to 11 do P[n]:=sort(expand(n!*coeff(Gser,x^n))) od: seq(seq(coeff(t*P[n],t^k),k=1..n+1),n=0..11); %p A097591 # second Maple program: %p A097591 b:= proc(u, o, t) option remember; `if`(u+o=0, x^t, expand( %p A097591 add(b(u+j-1, o-j, irem(t+1, 2)), j=1..o)+ %p A097591 add(b(u-j, o+j-1, 1)*x^t, j=1..u))) %p A097591 end: %p A097591 T:= n-> (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n, 0, 1)): %p A097591 seq(T(n), n=0..12); # _Alois P. Heinz_, Nov 19 2013 %t A097591 b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, x^t, Expand[Sum[b[u+j-1, o-j, Mod[t+1, 2]], {j, 1, o}] + Sum[b[u-j, o+j-1, 1]*x^t, {j, 1, u}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 1, Exponent[p, x]}]][b[n, 0, 1]]; Table[T[n], {n, 0, 12}] // Flatten (* _Jean-François Alcover_, Feb 19 2015, after _Alois P. Heinz_ *) %Y A097591 Bisections of columns k=0-1 give: A000680, A302910. %Y A097591 Row sums give A000142. %Y A097591 T(n+1,n-1) gives A000337. %Y A097591 T(4n,2n) gives A308962. %Y A097591 Cf. A096654, A097592. %K A097591 nonn,tabl %O A097591 0,8 %A A097591 _Emeric Deutsch_, Aug 29 2004