cp's OEIS Frontend

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.

Showing 1-2 of 2 results.

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)).

Original entry on oeis.org

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, 56, 40, 20, 12, 1, 1, 26, 84, 100, 110, 60, 27, 14, 1, 1, 46, 145, 250, 210, 190, 84, 35, 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
Offset: 1

Views

Author

Emeric Deutsch, Oct 12 2009

Keywords

Comments

Sum of entries in row n = A004148(n+1) (the secondary structure numbers).
T(n,0) = A166289(n).
Sum(k*T(n,k), k=0..n-1) = A166290(n).

Examples

			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).
Triangle starts:
  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;
  ...
		

Crossrefs

T(2n,n) gives A333156.

Programs

  • Maple
    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
    # second Maple program:
    b:= proc(x, y, t) option remember; `if`(y<0 or y>x or 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]))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0, 1)):
    seq(T(n), n=1..15);  # Alois P. Heinz, Jun 04 2014
  • Mathematica
    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 *)

Formula

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.

A304361 Number of Dyck paths of semilength 2n having exactly n (possibly overlapping) occurrences of the consecutive pattern UDUD, where U=(1,1) and D=(1,-1).

Original entry on oeis.org

1, 1, 1, 9, 41, 244, 1555, 10037, 68599, 476981, 3399518, 24652718, 181411439, 1352123760, 10185964435, 77458698781, 593871350009, 4586247704944, 35646681303447, 278665636846853, 2189789189667782, 17288684906561300, 137081212514315262, 1091163063187762414
Offset: 0

Views

Author

Alois P. Heinz, May 11 2018

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0,
          `if`(x=0, 1, expand(b(x-1, y+1, [2, 2, 4, 2][t])
            +b(x-1, y-1, [1, 3, 1, 3][t])*`if`(t=4, z, 1))))
        end:
    a:= n-> coeff(b(4*n, 0, 1), z, n):
    seq(a(n), n=0..35);
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = If[y < 0 || y > x, 0, If[x == 0, 1, Expand[ b[x - 1, y + 1, {2, 2, 4, 2}[[t]]] + b[x - 1, y - 1, {1, 3, 1, 3}[[t]]]*If[t == 4, z, 1]]]];
    a[n_] := Coefficient[b[4*n, 0, 1], z, n];
    Table[a[n], {n, 0, 35}] (* Jean-François Alcover, Jun 02 2018, from Maple *)

Formula

a(n) = A094507(2n,n).
a(n) ~ c * d^n / n^2, where d = 8.678461743575504549836851346229164298625429506253061911480810294... is the real root of equation 28*d^5 - 72*d^4 - 1119*d^3 - 3136*d^2 - 272*d - 16 = 0 and c = 0.15899091419445210968174633623072264522489566046427010886172717963... - Vaclav Kotesovec, Mar 25 2020
Showing 1-2 of 2 results.