OFFSET
0,9
LINKS
Alois P. Heinz, Antidiagonals n = 0..140, flattened
Wikipedia, Partition of a set
EXAMPLE
A(3,0) = 1: 1|2|3.
A(3,1) = 5: 123, 12|3, 13|2, 1|23, 1|2|3.
A(5,2) = 7: 135|24, 13|24|5, 15|24|3, 1|24|35, 15|2|3|4, 1|2|35|4, 1|2|3|4|5.
A(7,3) = 9: 147|25|36, 14|25|36|7, 17|25|36|4, 1|25|36|47, 17|2|36|4|5, 1|2|36|47|5, 17|2|3|4|5|6, 1|2|3|47|5|6, 1|2|3|4|5|6|7.
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 5, 2, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 15, 3, 2, 1, 1, 1, 1, 1, 1, 1, ...
1, 52, 7, 3, 2, 1, 1, 1, 1, 1, 1, ...
1, 203, 14, 4, 3, 2, 1, 1, 1, 1, 1, ...
1, 877, 39, 9, 4, 3, 2, 1, 1, 1, 1, ...
1, 4140, 95, 18, 5, 4, 3, 2, 1, 1, 1, ...
1, 21147, 304, 33, 11, 5, 4, 3, 2, 1, 1, ...
1, 115975, 865, 89, 22, 6, 5, 4, 3, 2, 1, ...
MAPLE
b:= proc(n, k, m, t) option remember; `if`(n=0, 1,
add(`if`(irem(j-t, k)=0, b(n-1, k, max(m, j),
irem(t+1, k)), 0), j=1..m+1))
end:
A:= (n, k)-> `if`(k=0, 1, b(n, k, 0, 1)):
seq(seq(A(n, d-n), n=0..d), d=0..14);
MATHEMATICA
b[n_, k_, m_, t_] := b[n, k, m, t] = If[n==0, 1, Sum[If[Mod[j-t, k]==0, b[n-1, k, Max[m, j], Mod[t+1, k]], 0], {j, 1, m+1}]]; A[n_, k_]:= If[k==0, 1, b[n, k, 0, 1]]; Table[A[n, d-n], {d, 0, 14}, {n, 0, d}] // Flatten (* Jean-François Alcover, Dec 18 2016, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Jul 08 2016
STATUS
approved