login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A243966 Number of Dyck paths of semilength n such that all five consecutive patterns of Dyck paths of semilength 3 occur at least once. 5

%I #16 Jan 26 2021 16:20:39

%S 0,0,0,0,0,0,0,0,0,0,0,0,12,138,1152,8166,52098,308964,1733444,

%T 9311300,48280464,243112106,1194286106,5744306228,27129749648,

%U 126111332862,578106334718,2617667137358,11723920607410,51998857149406,228621028644376,997286152915772

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

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

%H Alois P. Heinz, <a href="/A243966/b243966.txt">Table of n, a(n) for n = 0..300</a>

%e a(12) = 12: 101010110010110100111000, 101010110010111000110100, 101100101010110100111000, 101100101010111000110100, 110100101010110010111000, 110100101100101010111000, 110100111000101010110010, 110100111000101100101010, 111000101010110010110100, 111000101100101010110100, 111000110100101010110010, 111000110100101100101010.

%e Here 1=Up=(1,1), 0=Down=(1,-1).

%p b:= proc(x, y, l) option remember; local m; m:= min(l[]);

%p `if`(y>x or y<0 or 7-m>x, 0, `if`(x=0, 1,

%p b(x-1, y+1, [[2, 3, 4, 4, 2, 2, 7][l[1]],

%p [2, 3, 3, 5, 3, 2, 7][l[2]], [2, 3, 3, 2, 6, 3,7][l[3]],

%p [2, 2, 4, 5, 2, 4, 7][l[4]], [2, 2, 4, 2, 6, 2,7][l[5]]])+

%p b(x-1, y-1, [[1, 1, 1, 5, 6, 7, 7][l[1]],

%p [1, 1, 4, 1, 6, 7, 7][l[2]], [1, 1, 4, 5, 1, 7, 7][l[3]],

%p [1, 3, 1, 3, 6, 7, 7][l[4]], [1, 3, 1, 5, 1, 7, 7][l[5]]])))

%p end:

%p a:= n-> b(2*n, 0, [1$5]):

%p seq(a(n), n=0..35);

%t b[x_, y_, l_] := b[x, y, l] = Module[{m = Min[l]},

%t If[y>x || y<0 || 7-m>x, 0, If[x == 0, 1,

%t b[x-1, y+1, MapIndexed[#1[[l[[#2[[1]] ]] ]]&,

%t {{2, 3, 4, 4, 2, 2, 7},

%t {2, 3, 3, 5, 3, 2, 7},

%t {2, 3, 3, 2, 6, 3, 7},

%t {2, 2, 4, 5, 2, 4, 7},

%t {2, 2, 4, 2, 6, 2, 7}}]]] +

%t b[x-1, y-1, MapIndexed[#1[[l[[#2[[1]] ]] ]]&,

%t {{1, 1, 1, 5, 6, 7, 7},

%t {1, 1, 4, 1, 6, 7, 7},

%t {1, 1, 4, 5, 1, 7, 7},

%t {1, 3, 1, 3, 6, 7, 7},

%t {1, 3, 1, 5, 1, 7, 7}}]]]];

%t a[n_] := b[2n, 0, {1, 1, 1, 1, 1}];

%t a /@ Range[0, 35] (* _Jean-François Alcover_, Jan 26 2021, after _Alois P. Heinz_ *)

%Y Cf. A014486, A063171, A243820, A243965, A243986.

%K nonn

%O 0,13

%A _Alois P. Heinz_, Jun 16 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:23 EDT 2024. Contains 371989 sequences. (Running on oeis4.)