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.

A288751 Number of Dyck paths of semilength n such that the maximal number of peaks per level equals ten.

This page as a plain text file.
%I A288751 #13 Apr 24 2021 08:45:22
%S A288751 1,1,23,113,690,3620,18562,91628,441694,2086758,9699872,44473357,
%T A288751 201530730,904002266,4019194153,17730014882,77671514151,338156070316,
%U A288751 1464024164516,6306519136902,27042360481662,115475401501264,491223012388610,2082320685801754
%N A288751 Number of Dyck paths of semilength n such that the maximal number of peaks per level equals ten.
%H A288751 Alois P. Heinz, <a href="/A288751/b288751.txt">Table of n, a(n) for n = 10..1000</a>
%H A288751 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>
%p A288751 b:= proc(n, k, j) option remember; `if`(j=n, 1, add(
%p A288751       b(n-j, k, i)*add(binomial(i, m)*binomial(j-1, i-1-m),
%p A288751        m=max(0, i-j)..min(k, i-1)), i=1..min(j+k, n-j)))
%p A288751     end:
%p A288751 g:= proc(n, k) option remember; add(b(n, k, j), j=1..k) end:
%p A288751 a:= n-> g(n, 10)-g(n, 9):
%p A288751 seq(a(n), n=10..35);
%t A288751 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, 10] - g[n, 9], {n, 10, 35}] (* _Indranil Ghosh_, Aug 08 2017 *)
%o A288751 (Python)
%o A288751 from sympy.core.cache import cacheit
%o A288751 from sympy import binomial
%o A288751 @cacheit
%o A288751 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 range(max(0, i - j), min(k, i - 1) + 1)]) for i in range(1, min(j + k, n - j) + 1)])
%o A288751 def g(n, k): return sum([b(n, k, j) for j in range(1, k + 1)])
%o A288751 def a(n): return g(n, 10) - g(n, 9)
%o A288751 print([a(n) for n in range(10, 36)]) # _Indranil Ghosh_, Aug 08 2017
%Y A288751 Column k=10 of A287822.
%Y A288751 Cf. A000108.
%K A288751 nonn
%O A288751 10,3
%A A288751 _Alois P. Heinz_, Jun 14 2017