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!)
A288940 Number of Dyck paths having n (positive) levels and exactly n peaks per level. 3

%I #19 Jul 07 2017 06:03:48

%S 1,1,9,27076,147556480375,4711342006036190504484,

%T 2162932174406679548553402518043252929,

%U 29605698225102450501737027784037791564430800582087459328,22346336234943531646124131709622442581521043809236751640919325993842966011809319

%N Number of Dyck paths having n (positive) levels and exactly n peaks per level.

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

%H Alois P. Heinz, <a href="/A288940/b288940.txt">Table of n, a(n) for n = 0..15</a>

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

%e . a(1) = 1: /\ .

%e .

%e . a(2) = 9: /\/\ /\/\ /\/\ /\ /\

%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(k, n$3), k=n^2+n-1..n^2*(n+1)/2)):

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

%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[k, n, n, n], {k, n^2 + n - 1, n^2*(n + 1)/2}]]; Table[a[n], {n, 0, 8}] (* _Indranil Ghosh_, Jul 06 2017, after Maple code *)

%Y Main diagonal of A288972.

%Y Cf. A288318.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Jun 19 2017

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 August 11 19:17 EDT 2024. Contains 375073 sequences. (Running on oeis4.)