OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1309
FORMULA
T(n,1) = T(1,n) = A000045(n).
T(n,k) = 0 if n <= 0 or k <= 0.
T(n,k) = T(n-1,k-1) + T(n,k-1) + T(n-1,k), n > 1, k > 1.
T(n,k) = T(k,n).
T(n,4) = A000045(n+9) - 34 - 14*n - 4*n^2. T(n,5) = A000045(n+12) -8*n^3/3 -14*n^2 -208*n/3 -142. - R. J. Mathar, Aug 29 2011
EXAMPLE
Diagonal of the matrix T(n,k) which starts for n,k >= 1 as:
1 1 2 3 5 8 13 21 34 55
1 3 6 11 19 32 53 87 142 231
2 6 15 32 62 113 198 338 567 940
3 11 32 79 173 348 659 1195 2100 3607
5 19 62 173 425 946 1953 3807 7102 12809
8 32 113 348 946 2317 5216 10976 21885 41796
13 53 198 659 1953 5216 12749 28941 61802 125483
21 87 338 1195 3807 10976 28941 70631 161374 348659
MAPLE
A := proc(n, k) option remember; if n<=0 or k<=0 then 0; elif k = 1 then combinat[fibonacci](n) ; elif n = 1 then combinat[fibonacci](k) ; else procname(n-1, k-1)+procname(n, k-1)+procname(n-1, k) ; end if; end proc:
A193913 := proc(n) A(n, n) ; end proc: # R. J. Mathar, Aug 28 2011
# second Maple program:
b:= proc(x, y) option remember; `if`(x<2, (<<0|1>, <1|1>>^y)[1, 2],
b(x-1, y)+b(sort([x, y-1])[])+b(x-1, y-1))
end:
a:= n-> b(n$2):
seq(a(n), n=1..29); # Alois P. Heinz, Jul 14 2021
MATHEMATICA
T[n_ /; n>=1, 1] := T[1, n] = Fibonacci[n];
T[n_ /; n>=1, k_] /; n>=k := T[n, k] = T[n-1, k-1] + T[n, k-1] + T[n-1, k];
T[n_, k_] /; k>n := T[k, n];
T[_, _] = 0;
a[n_] := T[n, n];
Array[a, 24] (* Jean-François Alcover, Apr 26 2022 *)
PROG
(MATLAB) function [ out ] = a( n )
ary=zeros(n, n);
ary(1, 1)=1;
if(n==1)
out= 1;
return;
end
ary(2, 1)=1;
ary(1, 2)=1;
for i=3:n
ary(i, 1)=ary(i-1, 1)+ary(i-2, 1);
ary(1, i)=ary(1, i-1)+ary(1, i-2);
end
for i=2:n
for j=2:n
ary(i, j)=ary(i, j-1)+ary(i-1, j-1)+ary(i-1, j);
end
end
out=ary(n, n)
CROSSREFS
KEYWORD
nonn
AUTHOR
Jaley H Dholakiya, Aug 09 2011
STATUS
approved