cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A293171 Triangle read by rows: T(n,k) = number of colored weighted Motzkin paths ending at (n,k).

This page as a plain text file.
%I A293171 #15 Dec 19 2019 11:36:19
%S A293171 1,1,1,9,2,1,25,15,3,1,145,52,22,4,1,561,285,90,30,5,1,2841,1206,495,
%T A293171 140,39,6,1,12489,6027,2261,791,203,49,7,1,60705,27560,11452,3864,
%U A293171 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
%N A293171 Triangle read by rows: T(n,k) = number of colored weighted Motzkin paths ending at (n,k).
%H A293171 Sheng-Liang Yang, Yan-Ni Dong, and Tian-Xiao He, <a href="http://dx.doi.org/10.1016/j.disc.2017.07.006">Some matrix identities on colored Motzkin paths</a>, Discrete Mathematics 340.12 (2017): 3081-3091. See p. 3087.
%e A293171 Triangle begins:
%e A293171 1,
%e A293171 1,1,
%e A293171 9,2,1,
%e A293171 25,15,3,1,
%e A293171 145,52,22,4,1,
%e A293171 561,285,90,30,5,1,
%e A293171 ...
%p A293171 A293171 := proc(n,k)
%p A293171     option remember;
%p A293171     local b,e,c;
%p A293171     b := 1; e:= 2; c := e^2 ;
%p A293171     if k < 0 or k > n then
%p A293171         0;
%p A293171     elif k = n then
%p A293171         1;
%p A293171     elif k = 0 then
%p A293171         b*procname(n-1,0)+2*c*procname(n-1,1) ;
%p A293171     else
%p A293171         procname(n-1,k-1)+b*procname(n-1,k)+c*procname(n-1,k+1) ;
%p A293171     end if;
%p A293171 end proc:
%p A293171 seq(seq( A293171(n,k),k=0..n),n=0..15) ; # _R. J. Mathar_, Oct 27 2017
%t A293171 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]]];
%t A293171 Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Dec 19 2019, after _R. J. Mathar_ *)
%Y A293171 First column is A084605, 2nd A098520.
%K A293171 nonn,tabl
%O A293171 0,4
%A A293171 _N. J. A. Sloane_, Oct 19 2017