A102405 Triangle read by rows: T(n,k) is number of Dyck paths of semilength n having k ascents of length 1 that start at an odd level.
1, 1, 2, 4, 1, 10, 3, 1, 26, 12, 3, 1, 72, 41, 15, 3, 1, 206, 143, 58, 18, 3, 1, 606, 492, 231, 76, 21, 3, 1, 1820, 1693, 891, 335, 95, 24, 3, 1, 5558, 5823, 3403, 1411, 455, 115, 27, 3, 1, 17206, 20040, 12870, 5848, 2061, 591, 136, 30, 3, 1, 53872, 69033, 48318, 23858, 9143, 2850, 743, 158, 33, 3, 1
Offset: 0
Examples
T(4,1) = 3 because we have UDUUD(U)DD, UUD(U)DDUD and UUUDD(U)DD, where U=(1,1), D=(1,-1) and the ascents of length 1 that start at an odd level are shown between parentheses. Triangle starts: 00 : 1; 01 : 1; 02 : 2; 03 : 4, 1; 04 : 10, 3, 1; 05 : 26, 12, 3, 1; 06 : 72, 41, 15, 3, 1; 07 : 206, 143, 58, 18, 3, 1; 08 : 606, 492, 231, 76, 21, 3, 1; 09 : 1820, 1693, 891, 335, 95, 24, 3, 1; 10 : 5558, 5823, 3403, 1411, 455, 115, 27, 3, 1;
Links
- Alois P. Heinz, Rows n = 0..150, flattened
- A. Sapounakis, I. Tasoulas and P. Tsikouras, Counting strings in Dyck paths, Discrete Math., 307 (2007), 2909-2924.
- Index entries for sequences related to Łukasiewicz
Programs
-
Maple
b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0, `if`(x=0, 1, expand(b(x-1, y-1, [2, 2, 4, 2][t]) +b(x-1, y+1, [1, 3, 1, 3][t])*`if`(t=4, z, 1)))) end: T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0, 1)): seq(T(n), n=0..15); # Alois P. Heinz, Jun 02 2014
-
Mathematica
b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x, 0, If[x == 0, 1, Expand[b[x-1, y-1, {2, 2, 4, 2}[[t]]] + b[x-1, y+1, {1, 3, 1, 3}[[t]]]*If[t == 4, z, 1]]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[2*n, 0, 1]]; Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, May 20 2015, after Alois P. Heinz *)
Formula
G.f.: G=G(t, z) satisfies zG^2-(1+z-z^2-tz+tz^2)G+1+z-tz=0.
Comments