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-4 of 4 results.

A243820 Number of Dyck paths of semilength n such that all sixteen consecutive step patterns of length 4 occur at least once.

Original entry on oeis.org

38, 587, 4785, 31398, 190050, 1043248, 5324534, 25711105, 119092876, 533680433, 2329450085, 9955122396, 41824314441, 173289259905, 709861015186, 2880803895035, 11601285215222, 46422795985447, 184784743066842, 732324944072523, 2891815190097065, 11385122145001833
Offset: 10

Views

Author

Alois P. Heinz, Jun 11 2014

Keywords

Examples

			a(10) = 38: 10101100111101000010, 10101101001111000010, 10101111000011010010, 10101111001101000010, 10101111010000110010, 10101111010011000010, 10110011110100001010, 10110011110101000010, 10110100111100001010, 10110101001111000010, 10111100001101001010, 10111100001101010010, 10111100110100001010, 10111100110101000010, 10111101000011001010, 10111101001100001010, 10111101010000110010, 10111101010011000010, 11001011110000110100, 11001011110100001100, 11001101011110000100, 11001101111000010100, 11001111000010110100, 11001111010000101100, 11001111010110000100, 11001111011000010100, 11010010111100001100, 11010011110000101100, 11010110011110000100, 11010111100001001100, 11010111100001100100, 11010111100100001100, 11010111100110000100, 11011001111000010100, 11011110000101001100, 11011110000110010100, 11011110010100001100, 11011110011000010100.  Here 1=Up=(1,1), 0=Down=(1,-1).
		

Crossrefs

Programs

  • Maple
    b:= proc(x, y, t, s) option remember; `if`(y<0 or y>x, 0,
          `if`(x=0, `if`(s={}, 1, 0), `if`(nops(s)>x, 0, add(
          b(x-1, y-1+2*j, irem(2*t+j, 8), s minus {2*t+j}), j=0..1))))
        end:
    a:= n-> add(b(2*n-3, l[], {$0..15}), l=[[1, 5], [1, 6], [3, 7]]):
    seq(a(n), n=10..20);
  • Mathematica
    b[x_, y_, t_, s_List] := b[x, y, t, s] = If[y < 0 || y > x, 0, If[x == 0, If[s == {}, 1, 0], If[Length[s] > x, 0, Sum[b[x - 1, y - 1 + 2 j, Mod[2 t + j, 8], s  ~Complement~  {2 t + j}], {j, 0, 1}]]]];
    a[n_] := Sum[b[2 n - 3, Sequence @@ l, Range[0, 15]], {l, {{1, 5}, {1, 6}, {3, 7}}}];
    a /@ Range[10, 31] (* Jean-François Alcover, Apr 28 2020, after Alois P. Heinz *)

A243965 Number of Dyck paths of semilength n such that both consecutive patterns of Dyck paths of semilength 2 occur at least once.

Original entry on oeis.org

0, 0, 0, 0, 2, 10, 44, 179, 702, 2701, 10278, 38866, 146450, 550817, 2070116, 7779655, 29248932, 110047905, 414446256, 1562538171, 5898049688, 22290789562, 84351810044, 319609669957, 1212552963576, 4606078246284, 17518748817596, 66712192842068, 254346235738120
Offset: 0

Views

Author

Alois P. Heinz, Jun 16 2014

Keywords

Comments

The consecutive patterns 1010, 1100 are counted. Here 1=Up=(1,1), 0=Down=(1,-1).

Examples

			a(4) = 2: 10101100, 11001010.
a(5) = 10: 1010101100, 1010110010, 1010111000, 1011001010, 1100101010, 1100110100, 1101001100, 1101011000, 1110001010, 1110010100.
Here 1=Up=(1,1), 0=Down=(1,-1).
		

Crossrefs

Programs

  • Maple
    b:= proc(x, y, t, s) option remember; `if`(y<0 or y>x, 0,
          `if`(x=0, `if`(s={}, 1, 0), `if`(nops(s)>x, 0, add(
          b(x-1, y-1+2*j, irem(2*t+j, 8), s minus {2*t+j}), j=0..1))))
        end:
    a:= n->  b(2*n, 0, 0, {10, 12}):
    seq(a(n), n=0..30);
  • Mathematica
    b[x_, y_, t_, s_] := b[x, y, t, s] = If[y<0 || y>x, 0, If[x == 0, If[s == {}, 1, 0], If[Length[s] > x, 0, Sum[b[x - 1, y - 1 + 2 j, Mod[2t + j, 8], s ~Complement~ {2t + j}], {j, 0, 1}]]]];
    a[n_] := b[2n, 0, 0, {10, 12}];
    a /@ Range[0, 30] (* Jean-François Alcover, Dec 21 2020, after Alois P. Heinz *)

Formula

a(n) ~ 4^n / (sqrt(Pi) * n^(3/2)). - Vaclav Kotesovec, Jun 18 2014

A243986 Number of Dyck paths of semilength n avoiding all five consecutive patterns of Dyck paths of semilength 3.

Original entry on oeis.org

1, 1, 2, 0, 1, 1, 4, 11, 29, 81, 220, 608, 1676, 4633, 12847, 35685, 99367, 277256, 775197, 2171691, 6095329, 17138861, 48274370, 136197884, 384868351, 1089211676, 3087038820, 8761410780, 24898994687, 70850054269, 201848300443, 575723018363, 1643931888516
Offset: 0

Views

Author

Alois P. Heinz, Jun 16 2014

Keywords

Comments

The consecutive patterns 101010, 101100, 110010, 110100, 111000 are avoided. Here 1=Up=(1,1), 0=Down=(1,-1).

Examples

			a(n) = A000108(n) for n<3.
a(3) = 0 because no Dyck path of semilength 3 can avoid itself.
a(4) = 1: 11001100.
a(5) = 1: 1110011000.
a(6) = 4: 101110011000, 110011001100, 111001100010, 111100110000.
a(7) = 11: 10101110011000, 10111001100010, 10111100110000, 11001110011000, 11011100110000, 11100110001010, 11100110001100, 11100110011000, 11110011000010, 11110011000100, 11111001100000.
		

Crossrefs

Column k=0 of A243998.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<18, [1$2, 2, 0, 1$2, 4, 11, 29,
           81, 220, 608, 1676, 4633, 12847, 35685, 99367, 277256][n+1],
          ((4*n-80)*a(n-18) +(16*n-302)*a(n-17) +(17*n-295)*a(n-16)
          -(15*n-273)*a(n-15) -(61*n-971)*a(n-14) -(73*n-1043)*a(n-13)
          -(19*n-191)*a(n-12) +(64*n-857)*a(n-11) +(114*n-1281)*a(n-10)
          +(90*n-855)*a(n-9) +(11*n-40)*a(n-8) -(53*n-433)*a(n-7)
          -(74*n-478)*a(n-6) -(42*n-225)*a(n-5) -(7*n-50)*a(n-4)
          +(10*n-17)*a(n-3) +(6*n-12)*a(n-2) +(n-2)*a(n-1))/(n+1))
        end:
    seq(a(n), n=0..40);
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = If[y<0 || y>x, 0, If[x == 0, 1, Expand[ Sum[b[x - 1, y - 1 + 2j, Mod[2t + j, 32]]*If[MemberQ[{42, 44, 50, 52, 56}, 2t + j], z, 1], {j, 0, 1}]]]];
    a[n_] := Coefficient[b[2n, 0, 0], z, 0];
    a /@ Range[0, 40] (* Jean-François Alcover, Dec 21 2020, after Alois P. Heinz in A243998 *)

Formula

Recurrence: see Maple program.
a(n) ~ c * d^n / n^(3/2), where d = 2.97831791935148503707065... is the root of the equation 4 + 12*d + 9*d^2 - 8*d^3 - 28*d^4 - 32*d^5 - 14*d^6 + 10*d^7 + 30*d^8 + 24*d^9 + 13*d^10 - 2*d^11 - 5*d^12 - 2*d^13 + d^14 = 0, c = 0.232860224447544532825428... . - Vaclav Kotesovec, Sep 06 2014

A243998 Number T(n,k) of Dyck paths of semilength n with exactly k (possibly overlapping) occurrences of some of the consecutive patterns of Dyck paths of semilength 3; triangle T(n,k), n>=0, 0<=k<=max(0,n-2), read by rows.

Original entry on oeis.org

1, 1, 2, 0, 5, 1, 11, 2, 1, 33, 7, 1, 4, 90, 30, 7, 1, 11, 245, 142, 24, 6, 1, 29, 680, 570, 121, 24, 5, 1, 81, 1884, 2176, 578, 112, 25, 5, 1, 220, 5265, 7935, 2649, 580, 116, 25, 5, 1, 608, 14747, 28022, 11827, 2825, 602, 124, 25, 5, 1
Offset: 0

Views

Author

Alois P. Heinz, Jun 17 2014

Keywords

Comments

The consecutive patterns 101010, 101100, 110010, 110100, 111000 are counted. Here 1=Up=(1,1), 0=Down=(1,-1).

Examples

			T(3,1) = 5: 101010, 101100, 110010, 110100, 111000.
T(4,0) = 1: 11001100.
T(4,2) = 2: 10101010, 10110010.
T(5,0) = 1: 1110011000.
T(6,3) = 7: 101010101100, 101010110010, 101100101010, 101100101100, 110010101010, 110010110010, 110101010100.
Triangle T(n,k) begins:
:  0 :   1;
:  1 :   1;
:  2 :   2;
:  3 :   0,    5;
:  4 :   1,   11,    2;
:  5 :   1,   33,    7,    1;
:  6 :   4,   90,   30,    7,   1;
:  7 :  11,  245,  142,   24,   6,   1;
:  8 :  29,  680,  570,  121,  24,   5,  1;
:  9 :  81, 1884, 2176,  578, 112,  25,  5, 1;
: 10 : 220, 5265, 7935, 2649, 580, 116, 25, 5, 1;
		

Crossrefs

Column k=0 gives A243986.
Row sums give A000108.

Programs

  • Maple
    b:= proc(x, y, t) option remember; `if`(y<0 or y>x, 0,
          `if`(x=0, 1, expand(add(b(x-1, y-1+2*j, irem(2*t+j, 32))*
          `if`(2*t+j in {42, 44, 50, 52, 56}, z, 1), j=0..1))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=0..degree(p)))(b(2*n, 0, 0)):
    seq(T(n), n=0..14);
  • Mathematica
    b[x_, y_, t_] := b[x, y, t] = If[y < 0 || y > x, 0,
         If[x == 0, 1, Expand[Sum[b[x-1, y-1 + 2j, Mod[2t+j, 32]]*
         Switch[2t+j, 42|44|50|52|56, z, _, 1], {j, 0, 1}]]]];
    T[n_] := CoefficientList[b[2n, 0, 0], z];
    Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Apr 30 2022, after Alois P. Heinz *)
Showing 1-4 of 4 results.