Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #14 Mar 12 2020 11:57:49
%S 1,1,1,2,1,1,2,4,1,1,4,5,6,1,1,6,12,9,8,1,1,9,23,24,14,10,1,1,17,38,
%T 56,40,20,12,1,1,26,84,100,110,60,27,14,1,1,46,145,250,210,190,84,35,
%U 16,1,1,81,280,480,580,385,301,112,44,18,1,1,135,551,995,1225,1155,644,448,144,54,20,1,1
%N Triangle read by rows: T(n,k) is the number of Dyck paths with no UUU's and no DDD's, of semilength n and having k UDUD's (0<=k <= n-1; U=(1,1), D=(1,-1)).
%C Sum of entries in row n = A004148(n+1) (the secondary structure numbers).
%C T(n,0) = A166289(n).
%C Sum(k*T(n,k), k=0..n-1) = A166290(n).
%H Alois P. Heinz, <a href="/A166288/b166288.txt">Rows n = 1..141, flattened</a>
%F G.f.: G(t,z) -1, where G=G(t,z) satisfies z^3*G^2 - (1+z-tz)(1-tz-z^2)G+(1+z-tz)^2=0.
%e T(5,2) = 6 because we have (UDUDUD)UUDD, UDU(UDUDUD)D, UUDD(UDUDUD), U(UDUD)D(UDUD), U(UDUDUD)DUD, and (UDUD)U(UDUD)D (the UDUD's are shown between parentheses).
%e Triangle starts:
%e 1;
%e 1, 1;
%e 2, 1, 1;
%e 2, 4, 1, 1;
%e 4, 5, 6, 1, 1;
%e 6, 12, 9, 8, 1, 1;
%e 9, 23, 24, 14, 10, 1, 1;
%e ...
%p F := RootOf(z^3*G^2-(1+z-t*z)*(1-t*z-z^2)*G+(1+z-t*z)^2, G): Fser := series(F, z = 0, 15): for n to 12 do P[n] := sort(coeff(Fser, z, n)) end do: for n to 12 do seq(coeff(P[n], t, j), j = 0 .. n-1) 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 or t=8, 0,
%p `if`(x=0, 1, expand(b(x-1, y+1, [2, 7, 4, 7, 2, 2, 8][t])
%p +`if`(t=4, z, 1) *b(x-1, y-1, [5, 3, 6, 3, 6, 8, 3][t]))))
%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=1..15); # _Alois P. Heinz_, Jun 04 2014
%t b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x || t == 8, 0, If[x == 0, 1, Expand[b[x-1, y+1, {2, 7, 4, 7, 2, 2, 8}[[t]] ] + If[t == 4, z, 1]*b[x-1, y-1, {5, 3, 6, 3, 6, 8, 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, 1, 15}] // Flatten (* _Jean-François Alcover_, Feb 19 2015, after _Alois P. Heinz_ *)
%Y Cf. A004148, A166289, A166290.
%Y T(2n,n) gives A333156.
%K nonn,tabl
%O 1,4
%A _Emeric Deutsch_, Oct 12 2009