This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A166288 #14 Mar 12 2020 11:57:49 %S A166288 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 A166288 56,40,20,12,1,1,26,84,100,110,60,27,14,1,1,46,145,250,210,190,84,35, %U A166288 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 A166288 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 A166288 Sum of entries in row n = A004148(n+1) (the secondary structure numbers). %C A166288 T(n,0) = A166289(n). %C A166288 Sum(k*T(n,k), k=0..n-1) = A166290(n). %H A166288 Alois P. Heinz, <a href="/A166288/b166288.txt">Rows n = 1..141, flattened</a> %F A166288 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 A166288 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 A166288 Triangle starts: %e A166288 1; %e A166288 1, 1; %e A166288 2, 1, 1; %e A166288 2, 4, 1, 1; %e A166288 4, 5, 6, 1, 1; %e A166288 6, 12, 9, 8, 1, 1; %e A166288 9, 23, 24, 14, 10, 1, 1; %e A166288 ... %p A166288 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 A166288 # second Maple program: %p A166288 b:= proc(x, y, t) option remember; `if`(y<0 or y>x or t=8, 0, %p A166288 `if`(x=0, 1, expand(b(x-1, y+1, [2, 7, 4, 7, 2, 2, 8][t]) %p A166288 +`if`(t=4, z, 1) *b(x-1, y-1, [5, 3, 6, 3, 6, 8, 3][t])))) %p A166288 end: %p A166288 T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0, 1)): %p A166288 seq(T(n), n=1..15); # _Alois P. Heinz_, Jun 04 2014 %t A166288 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 A166288 Cf. A004148, A166289, A166290. %Y A166288 T(2n,n) gives A333156. %K A166288 nonn,tabl %O A166288 1,4 %A A166288 _Emeric Deutsch_, Oct 12 2009