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.

Previous Showing 21-23 of 23 results.

A243838 Number T(n,k) of Dyck paths of semilength n having exactly k (possibly overlapping) occurrences of the consecutive steps UDUUDDUUUUDUDDDDUDUD (with U=(1,1), D=(1,-1)); triangle T(n,k), n>=0, 0<=k<=max(0,floor((n-1)/9)), read by rows.

Original entry on oeis.org

1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16795, 1, 58783, 3, 208002, 10, 742865, 35, 2674314, 126, 9694383, 462, 35355954, 1716, 129638355, 6435, 477614390, 24310, 1767170813, 92376, 1, 6563767708, 352708, 4, 24464914958, 1352046, 16, 91477363405, 5200170, 65
Offset: 0

Views

Author

Alois P. Heinz, Jun 11 2014

Keywords

Comments

UDUUDDUUUUDUDDDDUDUD is a Dyck path that contains all sixteen consecutive step patterns of length 4.

Examples

			Triangle T(n,k) begins:
:  0 :           1;
:  1 :           1;
:  2 :           2;
:  3 :           5;
:  4 :          14;
:  5 :          42;
:  6 :         132;
:  7 :         429;
:  8 :        1430;
:  9 :        4862;
: 10 :       16795,       1;
: 11 :       58783,       3;
: 12 :      208002,      10;
: 13 :      742865,      35;
: 14 :     2674314,     126;
: 15 :     9694383,     462;
: 16 :    35355954,    1716;
: 17 :   129638355,    6435;
: 18 :   477614390,   24310;
: 19 :  1767170813,   92376,  1;
: 20 :  6563767708,  352708,  4;
: 21 : 24464914958, 1352046, 16;
		

Crossrefs

Row sums give A000108.
T(736522,k) = A243752(736522,k).
T(n,0) = A243753(n,736522).
Cf. A243820.

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, 5, 2, 4,
           8, 9, 10, 11, 2, 13, 5, 4, 2, 2, 18, 2, 20, 5][t])
          +`if`(t=20, z, 1) *b(x-1, y-1, [1, 3, 1, 3, 6, 7,
           1, 3, 3, 3, 12, 1, 14, 15, 16, 17, 1, 19, 1, 3][t]))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0, 1)):
    seq(T(n), n=0..30);
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = If[x == 0, 1, Expand[If[y >= x - 1, 0, b[x - 1, y + 1, {2, 2, 4, 5, 2, 4, 8, 9, 10, 11, 2, 13, 5, 4, 2, 2, 18, 2, 20, 5}[[t]]]] + If[t == 20, z, 1]*If[y == 0, 0, b[x - 1, y - 1, {1, 3, 1, 3, 6, 7, 1, 3, 3, 3, 12, 1, 14, 15, 16, 17, 1, 19, 1, 3}[[t]]]]]];
    T[n_] := CoefficientList[b[2n, 0, 1], z];
    T /@ Range[0, 30] // Flatten (* Jean-François Alcover, Mar 27 2021, after Alois P. Heinz *)

A243870 Number of Dyck paths of semilength n avoiding the consecutive steps UDUUUDDDUD (with U=(1,1), D=(1,-1)).

Original entry on oeis.org

1, 1, 2, 5, 14, 41, 129, 419, 1395, 4737, 16338, 57086, 201642, 718855, 2583149, 9346594, 34023934, 124519805, 457889432, 1690971387, 6268769864, 23320702586, 87031840257, 325741788736, 1222429311437, 4598725914380, 17339388194985, 65514945338284
Offset: 0

Views

Author

Alois P. Heinz, Jun 13 2014

Keywords

Comments

UDUUUDDDUD is the only Dyck path of semilength 5 that contains all eight consecutive step patterns of length 3.

Crossrefs

Column k=0 of A243881.
Column k=738 of A243753.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<14, [1, 1, 2, 5, 14, 41,
           129, 419, 1395, 4737, 16338, 57086, 201642, 718855][n+1],
           ((4*n-2)*a(n-1) -(3*n-9)*a(n-4) +(10*n-41)*a(n-5)
           -(3*n-21)*a(n-8) +(8*n-64)*a(n-9) -(n-14)*a(n-10)
           -(n-11)*a(n-12) +(2*n-25)*a(n-13) +(14-n)*a(n-14))/(n+1))
        end:
    seq(a(n), n=0..40);
  • Mathematica
    a[n_] := a[n] = If[n<14, {1, 1, 2, 5, 14, 41, 129, 419, 1395, 4737, 16338, 57086, 201642, 718855}[[n+1]], ((4n-2)a[n-1] - (3n-9)a[n-4] + (10n-41)a[n-5] - (3n-21)a[n-8] + (8n-64)a[n-9] - (n-14)a[n-10] - (n-11)a[n-12] + (2n-25)a[n-13] + (14-n)a[n-14])/(n+1)];
    a /@ Range[0, 40] (* Jean-François Alcover, Mar 27 2021, after Alois P. Heinz *)

Formula

Recursion: see Maple program.

A246188 Triangle read by rows: T(n,k) is the number of Dyck paths of semilength n having k occurrences of the string ududu, where u=(1,1), d=(1,-1).

Original entry on oeis.org

1, 1, 2, 4, 1, 11, 2, 1, 31, 8, 2, 1, 92, 28, 9, 2, 1, 283, 99, 34, 10, 2, 1, 893, 354, 129, 40, 11, 2, 1, 2875, 1273, 492, 161, 46, 12, 2, 1, 9407, 4598, 1882, 646, 195, 52, 13, 2, 1, 31189, 16679, 7199, 2597, 816, 231, 58, 14, 2, 1, 104555, 60712, 27570, 10400, 3422, 1002, 269, 64, 15, 2, 1
Offset: 0

Views

Author

Emeric Deutsch, Sep 10 2014

Keywords

Comments

Row n contains n-1 entries (n>=2).
Sum of entries in row n is the Catalan number A000108(n).
Sum(k*T(n,k), k>=0) = A001791(n-2) (n>=2).
T(21,k) = A243752(21,k), T(n,0) = A243753(n,21) = A247333(n). - Alois P. Heinz, Sep 13 2014

Examples

			Row 4 is 11, 2, 1; indeed in the 14 Dyck paths of semilength 4 ududu occurs only once in ududuudd, once in uudududd, and twice in udududud.
Triangle starts:
   1;
   1;
   2;
   4, 1;
  11, 2, 1;
  31, 8, 2, 1;
  ...
		

Crossrefs

Programs

  • Maple
    C := proc (u) options operator, arrow: (1/2-(1/2)*sqrt(1-4*u))/u end proc: G := C(z*(1-t*z-z^2+t*z^2)/(1-t*z-z^3+t*z^3)): Gser := simplify(series(G, z = 0, 20)): T := proc (n, k) options operator, arrow: coeff(coeff(Gser, z, n), t, k) end proc: 1; 1; for n from 2 to 12 do seq(T(n, k), k = 0 .. n-2) end do; # yields sequence in triangular form
    # second Maple program:
    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, 4][t])*
         `if`(t=5, z, 1) +b(x-1, y-1, [1, 3, 1, 5, 1][t]))))
        end:
    T:= n->(p->seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0, 1)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Sep 10 2014
  • 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, 4}[[t]] ]*If[t == 5, z, 1] + b[x-1, y-1, {1, 3, 1, 5, 1}[[t]] ]]]]; 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, May 27 2015, after Alois P. Heinz *)

Formula

G.f.: C(z*(1-t*z-z^2+t*z^2)/(1-t*z-z^3+t*z^3)), where C(u) = (1-sqrt(1-4*u))/(2*u) is the Catalan function. See Corollary 2.2 in the Mansour reference.
Previous Showing 21-23 of 23 results.