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.

Showing 1-2 of 2 results.

A261003 a(n) = A136439(n) + Catalan(n).

Original entry on oeis.org

1, 2, 5, 15, 48, 160, 549, 1924, 6851, 24700, 89945, 330239, 1220884, 4540128, 16968958, 63701573, 240059998, 907760348, 3443048256, 13094812968, 49925646786, 190772846082, 730451716847, 2802033270234, 10767028435468, 41438212118088, 159711845145544, 616393788920923, 2381898673172602
Offset: 0

Views

Author

N. J. A. Sloane, Aug 12 2015

Keywords

Comments

This is the quantity S_{n-1} as given by a literal reading of Dershowitz and Rinderknecht (2015), Equations (1) and (2). If the lower limit in the right-hand sum in Eq. (1) is changed to "h >= 2", we obtain A136439.
a(n) is the total number of levels visited by all Dyck paths of semilength n. - Alois P. Heinz, Apr 14 2024

Crossrefs

Row sums of A371928.

Programs

  • Maple
    # Maple code for Equations (1) and (2) of Dershowitz and Rinderknecht (2015).
    H:=proc(n,h) local b,k; b:=binomial; add(b(2*n,n+1-k*h)-2*b(2*n,n-k*h)+b(2*n,n-1-k*h),k=1..n+1); end;
    S1:=n->add(H(n,h),h=1..n+1); [seq(S1(n),n=0..30)];
  • Mathematica
    b[x_, y_, h_] := b[x, y, h] = If[x == 0, h, Sum[If[x+j > y, b[x-1, y-j, Max[h, y-j]], 0], {j, Range[-1, Min[1, y]]~Complement~{0}}]];
    a[n_] :=  b[2n, 0, 0] + CatalanNumber[n];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Apr 15 2023, after Alois P. Heinz in A136439 *)

Formula

a(n) = A000108(n) + A136439(n).

A333498 Sum of the heights of all Motzkin paths of length n.

Original entry on oeis.org

0, 0, 1, 3, 9, 25, 70, 196, 552, 1560, 4423, 12573, 35826, 102310, 292786, 839554, 2411945, 6941593, 20011328, 57779038, 167069317, 483739961, 1402413161, 4070537585, 11827842021, 34403798725, 100167396088, 291903951462, 851380987390, 2485175809878
Offset: 0

Views

Author

Alois P. Heinz, Mar 24 2020

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(x, y, h) option remember; `if`(x=0, h, add(
          b(x-1, y+j, max(h, y)), j=-min(1, y)..min(1, x-y-1)))
        end:
    a:= n-> b(n, 0$2):
    seq(a(n), n=0..35);
  • Mathematica
    b[x_, y_, h_] := b[x, y, h] = If[x == 0, h, Sum[b[x - 1, y + j, Max[h, y]], {j, -Min[1, y], Min[1, x - y - 1]}]];
    a[n_] := b[n, 0, 0];
    a /@ Range[0, 35] (* Jean-François Alcover, May 10 2020, after Maple *)

Formula

a(n) = Sum_{k=1..floor(n/2)} k * A097862(n,k).
Showing 1-2 of 2 results.