cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A288681 Number of Dyck paths of semilength n such that no positive level has fewer than five peaks.

This page as a plain text file.
%I A288681 #13 Apr 24 2021 08:44:48
%S A288681 1,0,0,0,0,1,1,1,1,1,1,7,98,575,2009,5468,13365,30910,70156,170830,
%T A288681 531334,2203895,10091063,44034478,176213307,650957418,2258314543,
%U A288681 7491190627,24204620623,77794583961,254583038843,865776314524,3087754003802,11479621448305
%N A288681 Number of Dyck paths of semilength n such that no positive level has fewer than five peaks.
%H A288681 Alois P. Heinz, <a href="/A288681/b288681.txt">Table of n, a(n) for n = 0..300</a>
%H A288681 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>
%t A288681 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, 5, j], {j, 5, n}]]; Table[a[n], {n, 0, 35}] (* _Indranil Ghosh_, Aug 10 2017 *)
%o A288681 (Python)
%o A288681 from sympy.core.cache import cacheit
%o A288681 from sympy import binomial
%o A288681 @cacheit
%o A288681 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 A288681 def a(n): return 1 if n==0 else sum([b(n, 5, j) for j in range(5, n + 1)])
%o A288681 print([a(n) for n in range(36)]) # _Indranil Ghosh_, Aug 10 2017
%Y A288681 Column k=5 of A288386.
%Y A288681 Cf. A000108.
%K A288681 nonn
%O A288681 0,12
%A A288681 _Alois P. Heinz_, Jun 13 2017