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.

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

Original entry on oeis.org

1, 1, 7, 29, 163, 925, 5580, 34751, 222627, 1456952, 9699872, 65474460, 446971110, 3080074508, 21393773841, 149614083615, 1052537452164, 7443584137525, 52888757972865, 377382278671610, 2703141489113003, 19430405608302831, 140118758417377105
Offset: 0

Views

Author

Alois P. Heinz, Jun 01 2017

Keywords

Examples

			.                  /\       /\         /\/\
.  a(2) = 7:  /\/\/  \   /\/  \/\   /\/    \
.
.                                     /\/\
.   /\         /\  /\     /\/\       /    \
.  /  \/\/\   /  \/  \   /    \/\   /      \  .
		

Crossrefs

Cf. A287822.

Programs

  • Maple
    b:= proc(n, k, j) option remember; `if`(j=n, 1, add(
          b(n-j, k, i)*add(binomial(i, m)*binomial(j-1, i-1-m),
           m=max(0, i-j)..min(k, i-1)), i=1..min(j+k, n-j)))
        end:
    g:= proc(n, k) option remember; add(b(n, k, j), j=1..k) end:
    a:= n-> `if`(n=0, 1, g(2*n, n)-g(2*n, n-1)):
    seq(a(n), n=0..23);
  • Mathematica
    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, 1, Min[j + k, n - j]}]];
    g[n_, k_] := g[n, k] = Sum[b[n, k, j], {j, 1, k}];
    a[n_] := If[n == 0, 1, g[2*n, n] - g[2*n, n - 1]];
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Jun 02 2018, from Maple *)

Formula

a(n) = A287822(2n,n).