%I
%S 1,1,2,3,6,10,19,1,33,2,62,7,1,110,14,2,205,38,8,1,368,76,16,2,683,
%T 181,50,9,1,1235,360,101,18,2,2286,801,270,64,10,1,4153,1584,546,130,
%U 20,2,7674,3377,1340,387,80,11,1,13986,6640,2707,790,163,22,2,25813,13760,6272,2128,536,98,12,1
%N Triangle read by rows: T(n,k) is the number of dispersed Dyck paths of semilength n (i.e., Motzkin paths of length n with no (1,0)steps at positive heights) having k UUU's (U=(1,1)).
%C Row n (n>=4) contains floor(n/2)1 entries.
%C Sum of entries in row n is binomial(n,floor(n/2)) = A001405(n).
%C T(n,0) = A191519(n).
%C Sum_{k>=0} k*T(n,k) = A191520(n).
%H Alois P. Heinz, <a href="/A191518/b191518.txt">Rows n = 0..220, flattened</a>
%F G.f.: G=G(t,z) satisfies aG^2 + bG 1 = 0, where a=z(1zz^2z^3tz+tz^2+tz^3), and b=12zz^2+tz^2.
%e T(7,1) = 2 because we have UUUDDDH and HUUUDDD, where U=(1,1), H=(1,0), and D=(1,1).
%e Triangle starts:
%e 1;
%e 1;
%e 2;
%e 3;
%e 6;
%e 10;
%e 19, 1;
%e 33, 2;
%e 62, 7, 1;
%p a := z*(1zz^2z^3t*z+t*z^2+t*z^3): b := 12*zz^2+t*z^2: G := RootOf(a*g^2+b*g1 = 0, g): Gser := simplify(series(G, z = 0, 21)): for n from 0 to 18 do P[n] := sort(coeff(Gser, z, n)) end do: 1; 1; 2; 3; for n from 4 to 18 do seq(coeff(P[n], t, k), k = 0 .. floor((1/2)*n)2) end do; # yields sequence in triangular form
%p # second Maple program:
%p b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0,
%p `if`(x=0, 1, expand(b(x1, y+1, min(t+1, 3))*
%p `if`(t=3, z, 1) +b(x1, y1, 1)+ `if`(y=0, b(x1, 0, 1), 0))))
%p end:
%p T:= n> (p> seq(coeff(p, z, i), i=0..degree(p)))(b(n, 0, 1)):
%p seq(T(n), n=0..20); # _Alois P. Heinz_, Jun 02 2014
%t b[x_, y_, t_] := b[x, y, t] = If[y<0  y>x, 0, If[x == 0, 1, Expand[b[x1, y+1, Min[t+1, 3]]*If[t == 3, z, 1] + b[x1, y1, 1] + If[y == 0, b[x1, 0, 1], 0]]]]; T[n_] := Function[{p}, Table[Coefficient[p, z, i], {i, 0, Exponent[p, z]}]][b[n, 0, 1]]; Table[T[n], {n, 0, 20}] // Flatten (* _JeanFrançois Alcover_, May 27 2015, after _Alois P. Heinz_ *)
%Y Cf. A001405, A191519, A191520.
%K nonn,tabf
%O 0,3
%A _Emeric Deutsch_, Jun 07 2011
