OFFSET
0,5
COMMENTS
Diagonal sums : A082395.
LINKS
Alois P. Heinz, Rows n = 0..200, flattened
FORMULA
T(n,0)=1, T(0,k)=0 for k>0, T(n,k)=0 if k>n, T(n,k)=T(n-1,k-1)+T(n-1,k)+T(n-1,k+1).
Sum_{k=0..n} k * T(n,k) = A003462(n). - Alois P. Heinz, Apr 20 2018
EXAMPLE
Triangle begins:
1;
1, 1;
1, 2, 1;
1, 4, 3, 1;
1, 8, 8, 4, 1;
1, 17, 20, 13, 5, 1;
1, 38, 50, 38, 19, 6, 1;
...
MAPLE
T:= proc(n, k) option remember; `if`(k=0, 1,
`if`(k>n, 0, T(n-1, k-1)+T(n-1, k)+T(n-1, k+1)))
end:
seq(seq(T(n, k), k=0..n), n=0..12); # Alois P. Heinz, Apr 20 2018
MATHEMATICA
T[_, 0] = T[n_, n_] = 1;
T[n_, k_] /; 0<k<n := T[n, k] = T[n-1, k-1] + T[n-1, k] + T[n-1, k+1];
T[_, _] = 0;
Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 09 2019 *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Philippe Deléham, Nov 07 2009
STATUS
approved