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.
%I A288744 #12 Jun 22 2020 12:55:41 %S A288744 1,1,9,29,112,405,1514,5565,20249,73416,265616,957677,3441282, %T A288744 12329838,44062706,157105923,559009643,1985301783,7038496811, %U A288744 24913917722,88058727525,310832221932,1095854282575,3859201682187,13576884290502,47719628447310,167579774234059 %N A288744 Number of Dyck paths of semilength n such that the maximal number of peaks per level equals three. %H A288744 Alois P. Heinz, <a href="/A288744/b288744.txt">Table of n, a(n) for n = 3..1000</a> %H A288744 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a> %e A288744 . T(4) = 1: /\/\/\ %e A288744 . / \ . %p A288744 b:= proc(n, k, j) option remember; `if`(j=n, 1, add( %p A288744 b(n-j, k, i)*add(binomial(i, m)*binomial(j-1, i-1-m), %p A288744 m=max(0, i-j)..min(k, i-1)), i=1..min(j+k, n-j))) %p A288744 end: %p A288744 g:= proc(n, k) option remember; add(b(n, k, j), j=1..k) end: %p A288744 a:= n-> g(n, 3)-g(n, 2): %p A288744 seq(a(n), n=3..35); %t A288744 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, 3] - g[n, 2], {n, 3, 35}] (* _Indranil Ghosh_, Aug 09 2017 *) %o A288744 (Python) %o A288744 from sympy.core.cache import cacheit %o A288744 from sympy import binomial %o A288744 @cacheit %o A288744 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 A288744 def g(n, k): return sum(b(n, k, j) for j in range(1, k + 1)) %o A288744 def a(n): return g(n, 3) - g(n, 2) %o A288744 print([a(n) for n in range(3, 36)]) # _Indranil Ghosh_, Aug 09 2017 %Y A288744 Column k=3 of A287822. %Y A288744 Cf. A000108. %K A288744 nonn %O A288744 3,3 %A A288744 _Alois P. Heinz_, Jun 14 2017