login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A201638 Triangle read by rows, T(n,k) for 0<=k<=n, generalizes the colored Motzkin paths of A107264. 0

%I #14 Mar 17 2020 14:21:10

%S 1,3,1,12,6,1,54,33,9,1,261,180,63,12,1,1323,990,405,102,15,1,6939,

%T 5508,2511,756,150,18,1,37341,30996,15309,5229,1260,207,21,1,205011,

%U 176256,92610,34776,9630,1944,273,24,1,1143801,1011609,558414,225828,69498,16281,2835,348,27,1

%N Triangle read by rows, T(n,k) for 0<=k<=n, generalizes the colored Motzkin paths of A107264.

%F Recurrence: T(0,0)=1, T(0,k)=0 for k>0 and for n>=1 T(n,k) = T(n-1,k-1)+3*T(n-1,k)+3*T(n-1,k+1).

%e [0] [1]

%e [1] [3, 1]

%e [2] [12, 6, 1]

%e [3] [54, 33, 9, 1]

%e [4] [261, 180, 63, 12, 1]

%e [5] [1323, 990, 405, 102, 15, 1]

%e [6] [6939, 5508, 2511, 756, 150, 18, 1]

%e [7] [37341, 30996, 15309, 5229, 1260, 207, 21, 1]

%t T[0, 0] = 1; T[n_, n_] = 1; T[n_, k_] /; 0 <= k <= n := T[n, k] = T[n - 1, k - 1] + 3*T[n - 1, k] + 3*T[n - 1, k + 1]; T[_, _] = 0;

%t Table[T[n, k], {n, 0, 9}, {k, 0, n}] (* _Jean-François Alcover_, Jun 29 2019 *)

%o (Sage)

%o def A201638_triangle(dim):

%o T = matrix(ZZ,dim,dim)

%o for n in range(dim): T[n,n] = 1

%o for n in (1..dim-1):

%o for k in (0..n-1):

%o T[n,k] = T[n-1,k-1]+3*T[n-1,k]+3*T[n-1,k+1]

%o return T

%o A201638_triangle(8)

%K nonn,tabl

%O 0,2

%A _Peter Luschny_, Sep 20 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)