login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #19 Dec 21 2020 07:15:56

%S 0,0,0,0,2,10,44,179,702,2701,10278,38866,146450,550817,2070116,

%T 7779655,29248932,110047905,414446256,1562538171,5898049688,

%U 22290789562,84351810044,319609669957,1212552963576,4606078246284,17518748817596,66712192842068,254346235738120

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

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

%H Alois P. Heinz, <a href="/A243965/b243965.txt">Table of n, a(n) for n = 0..1000</a>

%H Vaclav Kotesovec, <a href="/A243965/a243965.txt">Recurrence (of order 10)</a>

%F a(n) ~ 4^n / (sqrt(Pi) * n^(3/2)). - _Vaclav Kotesovec_, Jun 18 2014

%e a(4) = 2: 10101100, 11001010.

%e a(5) = 10: 1010101100, 1010110010, 1010111000, 1011001010, 1100101010, 1100110100, 1101001100, 1101011000, 1110001010, 1110010100.

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

%p b:= proc(x, y, t, s) option remember; `if`(y<0 or y>x, 0,

%p `if`(x=0, `if`(s={}, 1, 0), `if`(nops(s)>x, 0, add(

%p b(x-1, y-1+2*j, irem(2*t+j, 8), s minus {2*t+j}), j=0..1))))

%p end:

%p a:= n-> b(2*n, 0, 0, {10, 12}):

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

%t 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}]]]];

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

%t a /@ Range[0, 30] (* _Jean-François Alcover_, Dec 21 2020, after _Alois P. Heinz_ *)

%Y Cf. A014486, A063171, A243820, A243966.

%K nonn

%O 0,5

%A _Alois P. Heinz_, Jun 16 2014