OFFSET
0,13
COMMENTS
A(n,k) is the number of partitions of k*(k*n+1)/2 into k distinct parts <=k*n.
A(n,k) = 0 if k>0 and (n = 0 or k*(k*n+1) mod 2 = 1).
LINKS
Alois P. Heinz, Antidiagonals d=0..60
EXAMPLE
A(0,0) = 1: {}.
A(1,1) = 1: {1}.
A(5,1) = 1: {3}.
A(1,5) = 1: {1,2,3,4,5}.
A(2,2) = 2: {1,4}, {2,3}.
A(3,2) = 3: {1,6}, {2,5}, {3,4}.
A(2,3) = 0: no subset of {1,2,3,4,5,6} has element sum 3*(3*2+1)/2 = 21/2.
A(4,2) = 4: {1,8}, {2,7}, {3,6}, {4,5}.
A(3,3) = 8: {1,5,9}, {1,6,8}, {2,4,9}, {2,5,8}, {2,6,7}, {3,4,8}, {3,5,7}, {4,5,6}.
A(2,4) = 8: {1,2,7,8}, {1,3,6,8}, {1,4,5,8}, {1,4,6,7}, {2,3,5,8}, {2,3,6,7}, {2,4,5,7}, {3,4,5,6}.
Square array A(n,k) begins:
1, 0, 0, 0, 0, 0, 0, 0, ...
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 0, 2, 0, 8, 0, 58, 0, ...
1, 1, 3, 8, 33, 141, 676, 3370, ...
1, 0, 4, 0, 86, 0, 3486, 0, ...
1, 1, 5, 25, 177, 1394, 11963, 108108, ...
1, 0, 6, 0, 318, 0, 32134, 0, ...
1, 1, 7, 50, 519, 5910, 73294, 957332, ...
MAPLE
b:= proc(n, i, t) option remember;
`if`(i<t or n<t*(t+1)/2 or n>t*(2*i-t+1)/2, 0,
`if`(n=0, 1, b(n, i-1, t) +`if`(n<i, 0, b(n-i, i-1, t-1))))
end:
A:= proc(n, k) local s; s:= k*(k*n+1);
`if`(k=0, 1, `if`(n=0 or irem(s, 2)=1, 0, b(s/2, k*n, k)))
end:
seq(seq(A(n, d-n), n=0..d), d=0..15);
MATHEMATICA
b[n_, i_, t_] /; i<t || n<t*((t+1)/2) || n>t*((2*i-t+1)/2) = 0; b[0, _, _] = 1; b[n_, i_, t_] := b[n, i, t] = b[n, i-1, t] + If[n<i, 0, b[n-i, i-1, t-1]]; a[_, 0] = 1; a[0, _] = 0; a[n_, k_] := With[{s = k*(k*n+1)}, If[Mod[s, 2] == 1, 0, b[s/2, k*n, k]]]; Flatten[ Table[ a[n, d-n], {d, 0, 15}, {n, 0, d}]] (* Jean-François Alcover, Jun 15 2012, translated from Maple, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Jan 15 2012
STATUS
approved