OFFSET
0,5
COMMENTS
Row sums form A097085.
LINKS
Alois P. Heinz, Rows n = 0..140, flattened
FORMULA
T(n,k) = Sum_{j=0..k} T(n-k,j)*C(k,j)^2.
EXAMPLE
T(8,3) = 236 = (1)*1^2 + (5)*3^2 + (18)*3^2 + (28)*1^2
= Sum_{j=0..3} T(5,j)*C(3,j)^2.
Rows begin:
[1],
[1,1],
[1,2,1],
[1,3,5,1],
[1,4,10,10,1],
[1,5,18,28,17,1],
[1,6,27,74,69,26,1],
[1,7,39,137,245,151,37,1],
[1,8,52,236,586,676,298,50,1],...
MAPLE
T:= proc(n, k) option remember;
`if`(n=k or k=0, 1, `if`(k<0 or k>n, 0,
add(T(n-k, j)*binomial(k, j)^2, j=0..k)))
end:
seq(seq(T(n, k), k=0..n), n=0..12); # Alois P. Heinz, Oct 30 2015
MATHEMATICA
T[_, 0] = 1; T[n_, n_] = 1; T[n_, k_] /; 0 < k < n := T[n, k] = Sum[T[n - k, j]*Binomial[k, j]^2, {j, 0, k}]; T[_, _] = 0;
Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 24 2016 *)
PROG
(PARI) T(n, k)=if(n<k || k<0, 0, if(n==k || k==0, 1, sum(j=0, n-k, T(n-k, j)*binomial(k, j)^2)))
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Paul D. Hanna, Jul 23 2004
STATUS
approved