OFFSET
1,8
COMMENTS
LINKS
Alois P. Heinz, Rows n = 1..141, flattened
Steven R. Finch, How far might we walk at random?, arXiv:1802.04615 [math.HO], 2018.
R. Kemp, On the average depth of a prefix of the Dycklanguage D_1, Discrete Math., 36, 1981, 155-170.
Toufik Mansour, Gokhan Yilidirim, Longest increasing subsequences in involutions avoiding patterns of length three, Turkish Journal of Mathematics (2019), Section 2.2
FORMULA
The g.f. of column k is g(k, z) = v^k*(1+v)*(1+v^2)*/((1+v^(k+1))*(1+v^(k+2))), where v = (1-sqrt(1-4*z^2))/(2*z). (Obtained as the difference G(k,z)-G(k-1,z), where G(k,z) is given in the R. Kemp reference (p. 159).)
EXAMPLE
T(5,3)=4 because we have UDUUU, UUDUU, UUUDD and UUUDU, where U=(1,1) and D=(1,-1).
Triangle starts:
1;
1, 1;
1, 1, 1;
1, 3, 1, 1;
1, 3, 4, 1; 1;
1, 7, 5, 5, 1, 1;
MAPLE
v := ((1-sqrt(1-4*z^2))*1/2)/z: g := proc (k) options operator, arrow: v^k*(1+v)*(1+v^2)/((1+v^(k+1))*(1+v^(k+2))) end proc: T := proc (n, k) options operator, arrow: coeff(series(g(k), z = 0, 50), z, n) end proc: for n from 0 to 12 do seq(T(n, k), k = 1 .. n) end do; # yields sequence in triangular form
# second Maple program:
b:= proc(x, y, k) option remember; `if`(x=0, z^k, `if`(y>0,
b(x-2, y-1, k), 0)+ b(x-2, y+1, max(y+1, k)))
end:
T:= n-> (p-> seq(coeff(p, z, i), i=1..n))(b(2*n, 0$2)):
seq(T(n), n=1..16); # Alois P. Heinz, Sep 05 2017
MATHEMATICA
b[x_, y_, k_] := b[x, y, k] = If[x == 0, z^k, If[y > 0, b[x - 2, y - 1, k], 0] + b[x - 2, y + 1, Max[y + 1, k]]];
T[n_] := Function[p, Table[Coefficient[p, z, i], {i, 1, n}]][b[2n, 0, 0]];
Table[T[n], {n, 1, 16}] // Flatten (* Jean-François Alcover, Apr 01 2018, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Emeric Deutsch, Sep 08 2007
EXTENSIONS
Keyword tabl added by Michel Marcus, Apr 09 2013
STATUS
approved