OFFSET
2,3
LINKS
Alois P. Heinz, Rows n = 2..55, flattened
EXAMPLE
T(5,1) = 9: 311, 113, 221, 122, 2111, 1211, 1121, 1112, 11111.
T(5,2) = 2: 131, 212.
T(7,2) = 8: 151, 313, 232, 3121, 1213, 2131, 1312, 12121.
T(7,3) = 2: 1231, 1321.
Triangle T(n,k) begins:
n\k: 1 2 3 4 5
---+---------------------------
02 : 1;
03 : 1;
04 : 4, 1;
05 : 9, 2;
06 : 18, 3;
07 : 41, 8, 2;
08 : 89, 16, 4;
09 : 185, 34, 10;
10 : 388, 57, 10;
11 : 810, 113, 30, 6;
12 : 1670, 213, 52, 12;
13 : 3435, 396, 104, 28;
14 : 7040, 733, 176, 50;
15 : 14360, 1333, 278, 62;
16 : 29226, 2419, 512, 152, 24;
MAPLE
b:= proc(n, l) option remember;
`if`(n=0, 1, add(`if`(j in l, 0, b(n-j,
`if`(l=[], [], [subsop(1=NULL, l)[], j]))), j=1..n))
end:
T:= (n, k)-> b(n, [0$(k-1)])-b(n, [0$k]):
seq(seq(T(n, k), k=1..floor((sqrt(8*n-7)-1)/2)), n=2..20);
MATHEMATICA
b[n_, l_] := b[n, l] = If[n == 0, 1, Sum[If[MemberQ[l, j], 0, b[n-j, If[l == {}, {}, Append[Rest[l], j]]]], {j, 1, n}]];
A[n_, k_] := b[n, Array[0&, Min[n, k]]];
T[n_, k_] := A[n, k-1] - A[n, k];
Table[T[n, k], {n, 2, 20}, {k, 1, Floor[(Sqrt[8*n-7]-1)/2]}] // Flatten (* Jean-François Alcover, Apr 13 2017, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, Sep 07 2015
STATUS
approved