OFFSET
0,3
COMMENTS
LINKS
Alois P. Heinz, Rows n = 0..200, flattened
FORMULA
G.f.: G=G(t, z) satisfies z[(1-t)z^2-(1-t)z+1]G^2-[1-(1-t)z^2]G+1=0.
EXAMPLE
T(5,1) = 6 because we have UUD(UU)DUDDD, UUD(UU)DDUDD, UUD(UU)DDDUD,
UDUUD(UU)DDD, UUDUD(UU)DDD and UUUDD(UU)DDD, where U=(1,1), D=(1,-1) (the ascents of length 2 starting at an odd level are shown between parentheses; note that the fourth path has an ascent of length 2 that starts at an even level).
Triangle starts:
: 0 : 1;
: 1 : 1;
: 2 : 2;
: 3 : 5;
: 4 : 13, 1;
: 5 : 36, 6;
: 6 : 105, 26, 1;
: 7 : 317, 104, 8;
: 8 : 982, 402, 45, 1;
: 9 : 3105, 1522, 225, 10;
: 10 : 9981, 5693, 1052, 69, 1;
MAPLE
G:=-1/2*(1-z^2+z^2*t-sqrt((z^2*t-z^2+4*z-1)*(z^2*t-z^2-1)))/z/(-z^2+z^2*t+z-z*t-1): Gser:=simplify(series(G, z=0, 18)): P[0]:=1: for n from 1 to 15 do P[n]:=coeff(Gser, z^n) od: 1; 1; for n from 2 to 15 do seq(coeff(t*P[n], t^j), j=1..floor(n/2)) od; # yields sequence in triangular form
# second Maple program:
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, 2, 5, 2][t])
*`if`(t=5, z, 1) +b(x-1, y-1, [1, 3, 4, 1, 3][t]))))
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 10 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, 2, 5, 2}[[t]]]*If[t==5, z, 1] + b[x-1, y-1, {1, 3, 4, 1, 3}[[t]]]]]]; 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, Mar 31 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, Nov 29 2005
STATUS
approved