OFFSET
0,2
COMMENTS
LINKS
Alois P. Heinz, Rows n = 1..200, flattened
P. Flajolet and R. Sedgewick, Analytic Combinatorics, 2009, page 211.
FORMULA
G.f.: G(t,z) = [1+(1-t)z^2]/[1-2z+(1-t)z^2*(1-z)^2].
EXAMPLE
T(7,2) = 4 because we have 0101010, 0101011, 0010101 and 1010101.
Triangle starts:
1;
2;
4;
8;
15, 1;
28, 4;
53, 10, 1;
...
MAPLE
G:=(1+(1-t)*z^2)/(1-2*z+(1-t)*z^2*(1-z)^2): Gser:=simplify(series(G, z=0, 20)): P[0]:=1: for n from 1 to 16 do P[n]:=coeff(Gser, z^n) od: 1; 2; for n from 1 to 16 do seq(coeff(P[n], t, j), j=0..floor(n/2)-1) od; # yields sequence in triangular form
# second Maple program:
b:= proc(n, t) option remember; `if`(n=0, 1,
expand(b(n-1, `if`(t=3, 4, 2))+
b(n-1, 3-2*irem(t, 2))*`if`(t=4, x, 1)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 1)):
seq(T(n), n=0..16); # Alois P. Heinz, Nov 28 2013
MATHEMATICA
nn=15; CoefficientList[Series[1/(1-2z-(u-1)z^4/(1-(u-1)z^2)), {z, 0, nn}], {z, u}]//Grid (* Geoffrey Critzer, Nov 29 2013 *)
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Emeric Deutsch, May 03 2006
STATUS
approved