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 no positive level has fewer than eight peaks.
2

%I #13 Apr 24 2021 08:44:59

%S 1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,10,335,4241,27915,117971,373845,

%T 1002089,2456082,5725439,12935530,28622833,62588817,139046970,

%U 353173119,1305216091,7035422989,41539474198,227550374938,1115122502718,4917988882292

%N Number of Dyck paths of semilength n such that no positive level has fewer than eight peaks.

%H Alois P. Heinz, <a href="/A288684/b288684.txt">Table of n, a(n) for n = 0..300</a>

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

%t b[n_, k_, j_]:=b[n, k, j]=If[j==n, 1, Sum[Sum[Binomial[i, m] Binomial[j - 1, i - 1 - m], {m, Max[k, i - j], i - 1}] b[n - j, k, i], {i, n - j}]]; a[n_]:=If[n==0, 1, Sum[b[n, 8, j], {j, 8, n}]]; Table[a[n], {n, 0, 40}] (* _Indranil Ghosh_, Aug 10 2017 *)

%o (Python)

%o from sympy.core.cache import cacheit

%o from sympy import binomial

%o @cacheit

%o def b(n, k, j): return 1 if j==n else sum([sum([binomial(i, m)*binomial(j - 1, i - 1 - m) for m in range(max(k, i - j), i)])*b(n - j, k, i) for i in range(1, n - j + 1)])

%o def a(n): return 1 if n==0 else sum([b(n, 8, j) for j in range(8, n + 1)])

%o print([a(n) for n in range(41)]) # _Indranil Ghosh_, Aug 10 2017

%Y Column k=8 of A288386.

%Y Cf. A000108.

%K nonn

%O 0,18

%A _Alois P. Heinz_, Jun 13 2017