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 A287213 #37 Dec 27 2018 22:43:03 %S A287213 1,1,1,1,1,3,1,1,7,5,2,1,15,18,13,5,1,31,57,61,38,15,1,63,169,248,215, %T A287213 129,52,1,127,482,935,1061,836,495,203,1,255,1341,3368,4835,4789,3573, %U A287213 2108,877,1,511,3669,11777,20973,25430,22986,16657,9831,4140 %N A287213 Number T(n,k) of set partitions of [n] such that the maximal absolute difference between consecutive elements within a block equals k; triangle T(n,k), n>=0, 0<=k<=max(n-1,0), read by rows. %C A287213 The maximal absolute difference is assumed to be zero if there is no block with consecutive elements. %C A287213 T(n,k) is defined for all n,k >= 0. The triangle contains only the positive terms. T(n,k) = 0 if k>=n and k>0. %H A287213 Alois P. Heinz, <a href="/A287213/b287213.txt">Rows n = 0..23, flattened</a> %H A287213 Wikipedia, <a href="https://en.wikipedia.org/wiki/Partition_of_a_set">Partition of a set</a> %F A287213 T(n,k) = A287214(n,k) - A287214(n,k-1) for k>0, T(n,0) = 1. %e A287213 T(4,0) = 1: 1|2|3|4. %e A287213 T(4,1) = 7: 1234, 123|4, 12|34, 12|3|4, 1|234, 1|23|4, 1|2|34. %e A287213 T(4,2) = 5: 124|3, 134|2, 13|24, 13|2|4, 1|24|3. %e A287213 T(4,3) = 2: 14|23, 14|2|3. %e A287213 Triangle T(n,k) begins: %e A287213 1; %e A287213 1; %e A287213 1, 1; %e A287213 1, 3, 1; %e A287213 1, 7, 5, 2; %e A287213 1, 15, 18, 13, 5; %e A287213 1, 31, 57, 61, 38, 15; %e A287213 1, 63, 169, 248, 215, 129, 52; %e A287213 1, 127, 482, 935, 1061, 836, 495, 203; %p A287213 b:= proc(n, k, l) option remember; `if`(n=0, 1, b(n-1, k, map(x-> %p A287213 `if`(x-n>=k, [][], x), [l[], n]))+add(b(n-1, k, sort(map(x-> %p A287213 `if`(x-n>=k, [][], x), subsop(j=n, l)))), j=1..nops(l))) %p A287213 end: %p A287213 A:= (n, k)-> b(n, min(k, n-1), []): %p A287213 T:= (n, k)-> A(n, k)-`if`(k=0, 0, A(n, k-1)): %p A287213 seq(seq(T(n, k), k=0..max(n-1, 0)), n=0..12); %t A287213 b[0, _, _] = 1; b[n_, k_, l_] := b[n, k, l] =b[n - 1, k, If[# - n >= k, Nothing, #]& /@ Append[l, n]] + Sum[b[n - 1, k, Sort[If[# - n >= k, Nothing, #]& /@ ReplacePart[l, j -> n]]], {j, 1, Length[l]}]; %t A287213 A[n_, k_] := b[n, Min[k, n - 1], {}]; %t A287213 T[n_, k_] := A[n, k] - If[k == 0, 0, A[n, k - 1]]; %t A287213 Table[Table[T[n, k], {k, 0, Max[n - 1, 0]}], {n, 0, 12}] // Flatten (* _Jean-François Alcover_, Apr 30 2018, after _Alois P. Heinz_ *) %Y A287213 Columns k=0-10 give: A000012, A000225(n-1), A258109, A294052, A294053, A294054, A294055, A294056, A294057, A294058, A294059. %Y A287213 Row sums and T(n+2,n+1) give A000110. %Y A287213 T(2n,n) gives A294024. %Y A287213 Cf. A287214, A287215, A287416, A287640. %K A287213 nonn,tabf %O A287213 0,6 %A A287213 _Alois P. Heinz_, May 21 2017