OFFSET
0,6
LINKS
Alois P. Heinz, Antidiagonals n = 0..150, flattened
FORMULA
T(n,k) = Sum_{i=0..k} A214258(n,i).
EXAMPLE
A(3,0) = 2: [3], [1,1,1].
A(4,1) = 6: [4], [2,2], [2,1,1], [1,2,1], [1,1,2], [1,1,1,1].
A(5,1) = 8: [5], [3,2], [2,3], [2,2,1], [2,1,2], [2,1,1,1], [1,2,2], [1,2,1,1], [1,1,2,1], [1,1,1,2], [1,1,1,1,1],
A(5,2) = 14: [5], [3,2], [3,1,1], [2,3], [2,2,1], [2,1,2], [2,1,1,1], [1,3,1], [1,2,2], [1,2,1,1], [1,1,3], [1,1,2,1], [1,1,1,2], [1,1,1,1,1].
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, ...
2, 2, 2, 2, 2, 2, 2, 2, ...
2, 4, 4, 4, 4, 4, 4, 4, ...
3, 6, 8, 8, 8, 8, 8, 8, ...
2, 11, 14, 16, 16, 16, 16, 16, ...
4, 15, 27, 30, 32, 32, 32, 32, ...
2, 27, 47, 59, 62, 64, 64, 64, ...
MAPLE
b:= proc(n, k, s, t) option remember;
`if`(n<0, 0, `if`(n=0, 1, add(b(n-j, k,
min(s, j), max(t, j)), j=max(1, t-k+1)..s+k-1)))
end:
A:= (n, k)-> `if`(n=0, 1, add(b(n-j, k+1, j, j), j=1..n)):
seq(seq(A(n, d-n), n=0..d), d=0..11);
# second Maple program:
b:= proc(n, s, t) option remember; `if`(n=0, x^(t-s),
add(b(n-j, min(s, j), max(t, j)), j=1..n))
end:
T:= (n, k)-> coeff(b(n$2, 0), x, k):
A:= proc(n, k) option remember; `if`(k<0, 0,
`if`(k>n, A(n$2), A(n, k-1)+T(n, k)))
end:
seq(seq(A(n, d-n), n=0..d), d=0..11); # Alois P. Heinz, Jan 05 2019
MATHEMATICA
b[n_, k_, s_, t_] := b[n, k, s, t] = If[n < 0, 0, If[n == 0, 1, Sum [b[n - j, k, Min[s, j], Max[t, j]], {j, Max[1, t - k + 1], s + k - 1}]]]; A[n_, k_] := If[n == 0, 1, Sum[b[n - j, k + 1, j, j], {j, 1, n}]]; Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 11}] // Flatten (* Jean-François Alcover, Dec 27 2013, translated from Maple *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Jul 08 2012
STATUS
approved