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 A274581 #28 Jun 09 2023 14:41:13 %S A274581 1,0,1,0,1,1,0,1,2,1,0,1,3,3,1,0,1,5,7,4,1,0,1,7,14,12,5,1,0,1,11,30, %T A274581 33,19,6,1,0,1,15,57,84,62,27,7,1,0,1,23,119,222,204,108,37,8,1,0,1, %U A274581 31,224,545,627,409,169,48,9,1,0,1,47,460,1425,2006,1558,763,254,61,10,1 %N A274581 Number T(n,k) of set partitions of [n] with alternating parity of elements and exactly k blocks; triangle T(n,k), n>=0, 0<=k<=n, read by rows. %H A274581 Alois P. Heinz, <a href="/A274581/b274581.txt">Rows n = 0..35, flattened</a> %H A274581 Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a> %F A274581 Sum_{k=0..n} k * T(n,k) = A305823(n). %e A274581 T(5,1) = 1: 12345. %e A274581 T(5,2) = 5: 1234|5, 123|45, 12|345, 145|23, 1|2345. %e A274581 T(5,3) = 7: 123|4|5, 12|34|5, 12|3|45, 1|234|5, 145|2|3, 1|2|345, 1|23|45. %e A274581 T(5,4) = 4: 12|3|4|5, 1|23|4|5, 1|2|34|5, 1|2|3|45. %e A274581 T(5,5) = 1: 1|2|3|4|5. %e A274581 Triangle T(n,k) begins: %e A274581 1; %e A274581 0, 1; %e A274581 0, 1, 1; %e A274581 0, 1, 2, 1; %e A274581 0, 1, 3, 3, 1; %e A274581 0, 1, 5, 7, 4, 1; %e A274581 0, 1, 7, 14, 12, 5, 1; %e A274581 0, 1, 11, 30, 33, 19, 6, 1; %e A274581 0, 1, 15, 57, 84, 62, 27, 7, 1; %e A274581 0, 1, 23, 119, 222, 204, 108, 37, 8, 1; %e A274581 0, 1, 31, 224, 545, 627, 409, 169, 48, 9, 1; %e A274581 ... %p A274581 b:= proc(l, i, t) option remember; `if`(l=[], x, %p A274581 `if`(l[1]=t, 0, expand(x*b(subsop(1=[][], l), 1, 1-t) %p A274581 ))+add(`if`(l[j]=t, 0, b(subsop(j=[][], l), j, 1-t) %p A274581 ), j=i..nops(l))) %p A274581 end: %p A274581 T:= n-> `if`(n=0, 1, (p-> seq(coeff(p, x, j), j=0..n))( %p A274581 b([seq(irem(i, 2), i=2..n)], 1$2))): %p A274581 seq(T(n), n=0..12); %t A274581 b[l_, i_, t_] := b[l, i, t] = If[l == {}, x, If[l[[1]] == t, 0, Expand[x*b[Rest[l], 1, 1 - t]]] + Sum[If[l[[j]] == t, 0, b[Delete[l, j], j, 1 - t]], {j, i, Length[l]}]]; %t A274581 T[n_] := If[n==0, {1}, Function[p, Table[Coefficient[p, x, j], {j, 0, n}]][ b[Table[Mod[i, 2], {i, 2, n}], 1, 1]]]; %t A274581 Flatten[Table[T[n], {n, 0, 12}]] (* _Jean-François Alcover_, May 27 2018, from Maple *) %Y A274581 Columns k=0-10 give: A000007, A057427, A052955(n-2) for n>1, A305777, A305778, A305779, A305780, A305781, A305782, A305783, A305784. %Y A274581 Diagonals include A000012, A001477, A077043. %Y A274581 Row sums give A274547. %Y A274581 T(n,ceiling(n/2)) gives A305785. %Y A274581 Cf. A124419, A274310 (parities alternate within blocks), A305823. %K A274581 nonn,tabl %O A274581 0,9 %A A274581 _Alois P. Heinz_, Jun 29 2016