OFFSET
0,14
LINKS
Alois P. Heinz, Rows n = 0..140, flattened
EXAMPLE
A(3,0) = 1: [3].
A(4,1) = 2: [4], [1,2,1].
A(5,2) = 5: [5], [3,2], [2,3], [2,1,2], [1,3,1].
A(6,3) = 12: [6], [4,2], [3,2,1], [3,1,2], [2,4], [2,3,1], [2,1,3], [2,1,2,1], [1,4,1], [1,3,2], [1,2,3], [1,2,1,2].
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, 1, ...
1, 3, 3, 3, 3, 3, 3, 3, ...
1, 2, 4, 4, 4, 4, 4, 4, ...
1, 4, 5, 7, 7, 7, 7, 7, ...
1, 5, 11, 12, 14, 14, 14, 14, ...
1, 5, 14, 20, 21, 23, 23, 23, ...
MAPLE
b:= proc(n, i, k) option remember; `if`(n<1 or i<1, 0,
`if`(n=i, 1, add(b(n-i, i+j, k), j={$-k..k} minus{0})))
end:
A:= (n, k)-> `if`(n=0, 1, add(b(n, j, min(n, k)), j=1..n)):
seq(seq(A(n, d-n), n=0..d), d=0..15);
MATHEMATICA
b[n_, i_, k_] := b[n, i, k] = If[n<1 || i<1, 0, If[n == i, 1, Sum[b[n-i, i+j, k], {j, Range[-k, -1] ~Join~ Range[k]}]]]; A[n_, k_] := If[n == 0, 1, Sum[b[n, j, Min[n, k]], {j, 1, n}]]; Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 15}] // Flatten (* Jean-François Alcover, Jan 15 2014, translated from Maple *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Jul 08 2012
STATUS
approved