OFFSET
0,5
COMMENTS
For the tiling algorithm, see A351322.
The table is read by rows. Reading the sequence {T(k,n)}, n=0,1,2,..., use T(n,k) instead of T(k,n) for n>k.
LINKS
Gerhard Kirchner, Maxima code
EXAMPLE
Triangle T(k,n) begins
k\n_0__1____2______3________4__________5____________6
0: 1
1: 1 1
2: 1 2 8
3: 1 3 26 163
4: 1 5 90 1125 15623
5: 1 8 306 7546 210690 5684228
6: 1 13 1046 51055 2865581 154869092 8459468955
MAPLE
b:= proc(n, l) option remember; local k, t;
if n=0 or l=[] then 1
elif min(l[])>0 then t:=min(l[]); b(n-t, map(h->h-t, l))
else for k while l[k]>0 do od; b(n, subsop(k=1, l))+
`if`(n>1, b(n, subsop(k=2, l)), 0)+ `if`(k<nops(l)
and l[k+1]=0, b(n, subsop(k=1, k+1=1, l))+
`if`(n>1, b(n, subsop(k=2, k+1=2, l)), 0), 0)
fi
end:
T:= (n, k)-> b(max(n, k), [0$min(n, k)]):
seq(seq(T(n, k), k=0..n), n=0..10); # Alois P. Heinz, May 06 2022
MATHEMATICA
b[n_, l_List] := b[n, l] = Module[{k, t}, Which[
n == 0 || l == {}, 1,
Min[l] > 0, t = Min[l]; b[n - t, l - t],
True, For[k = 1, l[[k]] > 0, k++]; b[n, ReplacePart[l, k -> 1]] +
If[n > 1, b[n, ReplacePart[l, k -> 2]], 0] + If[k < Length[l] &&
l[[k + 1]] == 0, b[n, ReplacePart[l, {k -> 1, k + 1 -> 1}]] +
If[n > 1, b[n, ReplacePart[l, {k -> 2, k+1 -> 2}]], 0], 0]]];
T[n_, k_] := b[Max[n, k], Array[0&, Min[n, k]]];
Table[Table[T[n, k], {k, 0, n}], {n, 0, 10}] // Flatten (* Jean-François Alcover, May 16 2022, after Alois P. Heinz *)
PROG
(Maxima) See Maxima code link.
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Gerhard Kirchner, Mar 22 2022
STATUS
approved