login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of Dyck paths having exactly n peaks in each of the levels 1,2,3 and no other peaks.
2

%I #16 Jul 07 2017 06:03:33

%S 1,10,471,27076,1713955,114751470,7969151855,567878871304,

%T 41247976697019,3040572724077010,226777538499783271,

%U 17076122335343354700,1296037531424347164115,99025149551454886937590,7609414766853344476768095,587623058661705739915402256

%N Number of Dyck paths having exactly n peaks in each of the levels 1,2,3 and no other peaks.

%C The semilengths of Dyck paths counted by a(n) are elements of the integer interval [3*n+2, 6*n] for n>0.

%H Alois P. Heinz, <a href="/A289030/b289030.txt">Table of n, a(n) for n = 0..523</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>

%e . a(1) = 10:

%e .

%e . /\ /\ /\ /\

%e . /\/ \ / \/\ /\/ \ / \/\

%e . /\/ \ /\/ \ / \/\ / \/\

%e .

%e . /\ /\ /\

%e . /\ / \ / \ /\ /\ / \

%e . /\/ \/ \ /\/ \/ \ / \/\/ \

%e .

%e . /\ /\ /\

%e . /\ / \ / \ /\ / \ /\

%e . / \/ \/\ / \/\/ \ / \/ \/\ .

%p b:= proc(n, k, j, v) option remember; `if`(n=j, `if`(v=1, 1, 0),

%p `if`(v<2, 0, add(b(n-j, k, i, v-1)*(binomial(i, k)*

%p binomial(j-1, i-1-k)), i=1..min(j+k, n-j))))

%p end:

%p a:= n-> `if`(n=0, 1, add(b(w, n$2, 3), w=3*n+2..6*n)):

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

%t b[n_, k_, j_, v_]:=b[n, k, j, v]=If[n==j, If[v==1, 1, 0], If[v<2, 0, Sum[b[n - j, k, i, v - 1] Binomial[i, k] Binomial[j - 1, i - 1 - k], {i, Min[j + k, n - j]}]]]; a[n_]:=If[n==0, 1, Sum[b[w, n, n, 3], {w, 3n + 2, 6n}]]; Table[a[n], {n, 0, 15}] (* _Indranil Ghosh_, Jul 06 2017, after maple code *)

%Y Row n=3 of A288972.

%K nonn

%O 0,2

%A _Alois P. Heinz_, Jun 22 2017