%I #22 Apr 01 2017 20:33:07
%S 1,1,2,5,13,1,36,5,1,104,21,6,1,309,84,28,7,1,939,322,124,36,8,1,2905,
%T 1206,522,174,45,9,1,9118,4455,2127,795,235,55,10,1,28964,16302,8492,
%U 3487,1155,308,66,11,1,92940,59268,33396,14894,5412,1617,394,78,12,1
%N Triangle read by rows: T(n,k) = the number of Dyck paths of semilength n with k UUUU's.
%C Each of rows 0, 1, 2, 3 has one entry. Row n (n >= 3) has n-2 entries. Row sums yield the Catalan numbers (A000108). Column 0 yields A036765. - _Emeric Deutsch_, Dec 14 2007
%H Alois P. Heinz, <a href="/A135305/b135305.txt">Rows n = 0..150, flattened</a>
%H FindStat - Combinatorial Statistic Finder, <a href="http://www.findstat.org/StatisticsDatabase/St000121">The number of occurrences of the contiguous pattern [.,[.,[.,[.,.]]]].</a>
%H A. Sapounakis, I. Tasoulas and P. Tsikouras, <a href="http://dx.doi.org/10.1016/j.disc.2007.03.005">Counting strings in Dyck paths</a>, Discrete Math., 307 (2007), 2909-2924.
%F G.f.: G=G(t,z) satisfies (1-t)*z^3*G^3 + z*(t+z-t*z)*G^2 + ((1-t)*z-1)*G+1 = 0. - _Emeric Deutsch_, Dec 14 2007
%e Triangle begins:
%e 1
%e 1
%e 2
%e 5
%e 13 1
%e 36 5 1
%e 104 21 6 1
%e 309 84 28 7 1
%e ...
%e T(5,1) = 5 because we have UUUUDUDDDD, UUUUDDUDDD, UUUUDDDUDD, UUUUDDDDUD and UDUUUUDDDD.
%p eq:=(1-t)*z^3*G^3+z*(t+z-t*z)*G^2+((1-t)*z-1)*G+1: g:=RootOf(eq,G): gser:= simplify(series(g,z=0,15)): for n from 0 to 12 do P[n]:=sort(coeff(gser,z,n)) end do: 1;1;2; for n from 3 to 12 do seq(coeff(P[n],t,j),j=0..n-3) end do; # yields sequence in triangular form; # _Emeric Deutsch_, Dec 14 2007
%p b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0,
%p `if`(x=0, 1, expand(b(x-1, y+1, min(t+1, 4))*
%p `if`(t=4, z, 1) +b(x-1, y-1, 1))))
%p end:
%p T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0, 1)):
%p seq(T(n), n=0..15); # _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[x-1, y+1, Min[t+1, 4]]*If[t == 4, z, 1] + b[x-1, y-1, 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_, Nov 28 2014, after _Alois P. Heinz_ *)
%Y Cf. A000108, A036765, A243752.
%K nonn,tabf
%O 0,3
%A _N. J. A. Sloane_, Dec 07 2007
%E Edited and extended by _Emeric Deutsch_, Dec 14 2007