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.

A136440 Sum of heights of all 2-watermelons with wall of length 2*n.

Original entry on oeis.org

3, 11, 60, 406, 3171, 27411, 255617, 2528613, 26224097, 282706396, 3147801820, 36022733951, 422047425238, 5046771514478, 61438059222438, 759851375725606, 9530872096367508, 121063493728881999, 1555352365759798758
Offset: 1

Views

Author

Steven Finch, Apr 02 2008

Keywords

Comments

Consider the set of all pairs of nonintersecting Dyck excursions of length 2*n (nonnegative walks with jumps -1,+1). The lower path begins and ends at 0; the upper path begins and ends at 2. a(n) is the sum of heights of all such upper-Dyck excursions.

Crossrefs

Programs

  • Mathematica
    c[n_] := 6*(2*n)!*(2*n+2)!/(n!*(n+1)!*(n+2)!*(n+3)!)
    s[n_,a_] := Sum[If[k < 1, 0, DivisorSigma[0,k]*Binomial[2*n,n+a-k]/Binomial[2*n,n]], {k,a-n,a+n}]
    t[n_,a_,b_] := Sum[If[(j < 1) || (k < 1), 0, DivisorSigma[0,GCD[j,k]]*Binomial[2*n,n+a-j]*Binomial[2*n,n+b-k]/Binomial[2*n,n]^2], {j,a-n,a+n}, {k,b-n,b+n}]
    f[n_] := (n^2+5*n+6)*(s[n,-3]+s[n,3])-(6*n^2+18*n)*(s[n,-2]+s[n,2])+(15*n^2+27*n+6)*(s[n,-1]+s[n,1])-(20*n^2+28*n+24)*s[n,0]
    g[n_] := t[n,-2,-2]-t[n,-1,-3]-2*t[n,-1,-2]+t[n,-1,-1]+2*t[n,-1,0]-t[n,-1,3]+2*t[n,0,-3]-4*t[n,0,0]+2*t[n,0,3]-t[n,1,-3]-2*t[n,1,-2]+2*t[n,1,-1]+2*t[n,1,0]+t[n,1,1]-t[n,1,3]+2*t[n,2,-2]-2*t[n,2,-1]-2*t[n,2,1]+t[n,2,2]
    h[n_] := ((n+1)*(n+2)/(12*(2*n+1)))*( (n+1)*(n+2)*(n+3)*g[n]+f[n] ) - 1
    a[n_] := h[n]*c[n]