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.

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

A243966 Number of Dyck paths of semilength n such that all five consecutive patterns of Dyck paths of semilength 3 occur at least once.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 138, 1152, 8166, 52098, 308964, 1733444, 9311300, 48280464, 243112106, 1194286106, 5744306228, 27129749648, 126111332862, 578106334718, 2617667137358, 11723920607410, 51998857149406, 228621028644376, 997286152915772
Offset: 0

Views

Author

Alois P. Heinz, Jun 16 2014

Keywords

Comments

The five consecutive patterns that occur at least once each are 101010, 101100, 110010, 110100, 111000. Here 1=Up=(1,1), 0=Down=(1,-1).

Examples

			a(12) = 12: 101010110010110100111000, 101010110010111000110100, 101100101010110100111000, 101100101010111000110100, 110100101010110010111000, 110100101100101010111000, 110100111000101010110010, 110100111000101100101010, 111000101010110010110100, 111000101100101010110100, 111000110100101010110010, 111000110100101100101010.
Here 1=Up=(1,1), 0=Down=(1,-1).
		

Crossrefs

Programs

  • Maple
    b:= proc(x, y, l) option remember; local m; m:= min(l[]);
          `if`(y>x or y<0 or 7-m>x, 0, `if`(x=0, 1,
          b(x-1, y+1, [[2, 3, 4, 4, 2, 2, 7][l[1]],
           [2, 3, 3, 5, 3, 2, 7][l[2]], [2, 3, 3, 2, 6, 3,7][l[3]],
           [2, 2, 4, 5, 2, 4, 7][l[4]], [2, 2, 4, 2, 6, 2,7][l[5]]])+
          b(x-1, y-1, [[1, 1, 1, 5, 6, 7, 7][l[1]],
           [1, 1, 4, 1, 6, 7, 7][l[2]], [1, 1, 4, 5, 1, 7, 7][l[3]],
           [1, 3, 1, 3, 6, 7, 7][l[4]], [1, 3, 1, 5, 1, 7, 7][l[5]]])))
        end:
    a:= n-> b(2*n, 0, [1$5]):
    seq(a(n), n=0..35);
  • Mathematica
    b[x_, y_, l_] := b[x, y, l] = Module[{m = Min[l]},
            If[y>x || y<0 || 7-m>x, 0, If[x == 0, 1,
            b[x-1, y+1, MapIndexed[#1[[l[[#2[[1]] ]] ]]&,
            {{2, 3, 4, 4, 2, 2, 7},
             {2, 3, 3, 5, 3, 2, 7},
             {2, 3, 3, 2, 6, 3, 7},
             {2, 2, 4, 5, 2, 4, 7},
             {2, 2, 4, 2, 6, 2, 7}}]]] +
            b[x-1, y-1, MapIndexed[#1[[l[[#2[[1]] ]] ]]&,
            {{1, 1, 1, 5, 6, 7, 7},
             {1, 1, 4, 1, 6, 7, 7},
             {1, 1, 4, 5, 1, 7, 7},
             {1, 3, 1, 3, 6, 7, 7},
             {1, 3, 1, 5, 1, 7, 7}}]]]];
    a[n_] := b[2n, 0, {1, 1, 1, 1, 1}];
    a /@ Range[0, 35] (* Jean-François Alcover, Jan 26 2021, after Alois P. Heinz *)
Showing 1-2 of 2 results.