This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A288745 Number of Dyck paths of semilength n such that the maximal number of peaks per level equals four. 2
 1, 1, 11, 38, 163, 648, 2571, 10173, 40025, 156087, 605057, 2335566, 8980883, 34412583, 131431024, 500437733, 1900135511, 7196366668, 27191450135, 102522926104, 385785153584, 1448985664032, 5432879981201, 20337296148823, 76015000686028, 283720418696600 (list; graph; refs; listen; history; text; internal format)
 OFFSET 4,3 LINKS Alois P. Heinz, Table of n, a(n) for n = 4..1000 Wikipedia, Counting lattice paths MAPLE b:= proc(n, k, j) option remember; `if`(j=n, 1, add(       b(n-j, k, i)*add(binomial(i, m)*binomial(j-1, i-1-m),        m=max(0, i-j)..min(k, i-1)), i=1..min(j+k, n-j)))     end: g:= proc(n, k) option remember; add(b(n, k, j), j=1..k) end: a:= n-> g(n, 4)-g(n, 3): seq(a(n), n=4..35); MATHEMATICA b[n_, k_, j_]:=b[n, k, j]=If[j==n, 1, Sum[b[n - j, k, i] Sum[Binomial[i, m] Binomial[j - 1, i - 1 - m], {m, Max[0, i - j], Min[k, i - 1]}], {i, Min[j + k, n - j]}]]; g[n_, k_]:=Sum[b[n, k, j], {j, k}]; Table[g[n, 4] - g[n, 3], {n, 4, 35}] (* Indranil Ghosh, Aug 08 2017 *) PROG (Python) from sympy.core.cache import cacheit from sympy import binomial @cacheit def b(n, k, j): return 1 if j==n else sum([b(n - j, k, i)*sum([binomial(i, m)*binomial(j - 1, i - 1 - m) for m in xrange(max(0, i - j), min(k, i - 1) + 1)]) for i in xrange(1, min(j + k, n - j) + 1)]) def g(n, k): return sum([b(n, k, j) for j in xrange(1, k + 1)]) def a(n): return g(n, 4) - g(n, 3) print map(a, xrange(4, 36)) # Indranil Ghosh, Aug 08 2017 CROSSREFS Column k=4 of A287822. Cf. A000108. Sequence in context: A024202 A213775 A133258 * A103738 A045801 A162261 Adjacent sequences:  A288742 A288743 A288744 * A288746 A288747 A288748 KEYWORD nonn AUTHOR Alois P. Heinz, Jun 14 2017 STATUS approved

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

Last modified March 25 10:08 EDT 2019. Contains 321469 sequences. (Running on oeis4.)