login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A288747 Number of Dyck paths of semilength n such that the maximal number of peaks per level equals six. 2
1, 1, 15, 59, 288, 1269, 5580, 24092, 102847, 434794, 1824249, 7600076, 31459191, 129505739, 530589496, 2164696038, 8798355232, 35639564649, 143919521948, 579526079335, 2327484839124, 9324921648372, 37275509745894, 148692946409186, 591979810055622 (list; graph; refs; listen; history; text; internal format)
OFFSET

6,3

LINKS

Alois P. Heinz, Table of n, a(n) for n = 6..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, 6)-g(n, 5):

seq(a(n), n=6..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, 6] - g[n, 5], {n, 6, 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, 6) - g(n, 5)

print map(a, xrange(6, 36)) # Indranil Ghosh, Aug 08 2017

CROSSREFS

Column k=6 of A287822.

Cf. A000108.

Sequence in context: A020187 A261798 A022287 * A223344 A206238 A064761

Adjacent sequences:  A288744 A288745 A288746 * A288748 A288749 A288750

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 20 22:44 EDT 2019. Contains 328291 sequences. (Running on oeis4.)