[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A293171
Triangle read by rows: T(n,k) = number of colored weighted Motzkin paths ending at (n,k).
1
1, 1, 1, 9, 2, 1, 25, 15, 3, 1, 145, 52, 22, 4, 1, 561, 285, 90, 30, 5, 1, 2841, 1206, 495, 140, 39, 6, 1, 12489, 6027, 2261, 791, 203, 49, 7, 1, 60705, 27560, 11452, 3864, 1190, 280, 60, 8, 1, 281185, 134073, 54468, 20076, 6174, 1710, 372, 72, 9, 1, 1353769, 633130, 268845, 99240, 33090, 9372, 2370, 480, 85, 10, 1
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
First column is A084605, 2nd A098520.
Sequence in context: A293258 A010536 A239908 * A334689 A335086 A151898
KEYWORD
nonn,tabl
AUTHOR
N. J. A. Sloane, Oct 19 2017
STATUS
approved