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.

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

This page as a plain text file.
%I A288748 #13 Apr 24 2021 08:45:18
%S A288748 1,1,17,71,368,1697,7769,34751,153313,668088,2882104,12329145,
%T A288748 52358300,220901081,926638057,3867432363,16068748557,66495876593,
%U A288748 274178902925,1126793986670,4616878543095,18864740697016,76885237242318,312611605360287,1268261191750753
%N A288748 Number of Dyck paths of semilength n such that the maximal number of peaks per level equals seven.
%H A288748 Alois P. Heinz, <a href="/A288748/b288748.txt">Table of n, a(n) for n = 7..1000</a>
%H A288748 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>
%p A288748 b:= proc(n, k, j) option remember; `if`(j=n, 1, add(
%p A288748       b(n-j, k, i)*add(binomial(i, m)*binomial(j-1, i-1-m),
%p A288748        m=max(0, i-j)..min(k, i-1)), i=1..min(j+k, n-j)))
%p A288748     end:
%p A288748 g:= proc(n, k) option remember; add(b(n, k, j), j=1..k) end:
%p A288748 a:= n-> g(n, 7)-g(n, 6):
%p A288748 seq(a(n), n=7..35);
%t A288748 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, 7] - g[n, 6], {n, 7, 35}] (* _Indranil Ghosh_, Aug 08 2017 *)
%o A288748 (Python)
%o A288748 from sympy.core.cache import cacheit
%o A288748 from sympy import binomial
%o A288748 @cacheit
%o A288748 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 A288748 def g(n, k): return sum([b(n, k, j) for j in range(1, k + 1)])
%o A288748 def a(n): return g(n, 7) - g(n, 6)
%o A288748 print([a(n) for n in range(7, 36)]) # _Indranil Ghosh_, Aug 08 2017
%Y A288748 Column k=7 of A287822.
%Y A288748 Cf. A000108.
%K A288748 nonn
%O A288748 7,3
%A A288748 _Alois P. Heinz_, Jun 14 2017