OFFSET
0,4
LINKS
Sheng-Liang Yang, Yan-Ni Dong, and Tian-Xiao He, Some matrix identities on colored Motzkin paths, Discrete Mathematics 340.12 (2017): 3081-3091. See p. 3087.
EXAMPLE
Triangle begins:
1,
1,1,
9,2,1,
25,15,3,1,
145,52,22,4,1,
561,285,90,30,5,1,
...
MAPLE
A293171 := proc(n, k)
option remember;
local b, e, c;
b := 1; e:= 2; c := e^2 ;
if k < 0 or k > n then
0;
elif k = n then
1;
elif k = 0 then
b*procname(n-1, 0)+2*c*procname(n-1, 1) ;
else
procname(n-1, k-1)+b*procname(n-1, k)+c*procname(n-1, k+1) ;
end if;
end proc:
seq(seq( A293171(n, k), k=0..n), n=0..15) ; # R. J. Mathar, Oct 27 2017
MATHEMATICA
T[n_, k_] := T[n, k] = Module[{b=1, e=2, c=4}, Which[k<0 || k>n, 0, k==n, 1, k == 0, b*T[n-1, 0] + 2*c*T[n-1, 1], True, T[n-1, k-1] + b*T[n-1, k] + c*T[n-1, k+1]]];
Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 19 2019, after R. J. Mathar *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Oct 19 2017
STATUS
approved