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.

A257390 Number of 4-Motzkin paths of length n with no level steps at even level.

Original entry on oeis.org

1, 0, 1, 4, 18, 80, 357, 1596, 7150, 32096, 144362, 650568, 2937316, 13286368, 60205805, 273290988, 1242639446, 5659468736, 25816338046, 117945079736, 539646216188, 2472638868960, 11345220210658, 52124831171544, 239792244636876, 1104495824173376
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    rec:= a(n) = ((-16*n + 40)*a(n-3) + (-12*n+12)*a(n-2) +(8*n+4)*a(n-1))/(n+2):
    f:= gfun:-rectoproc({rec,a(0)=1,a(1)=0,a(2)=1},a(n),remember):
    seq(f(i),i=0..100); # Robert Israel, Apr 22 2015
  • Mathematica
    CoefficientList[Series[(1-4*x-Sqrt[(1-4*x)*(1-4*x-4*x^2)])/(2*x^2), {x, 0, 20}], x] (* Vaclav Kotesovec, Apr 22 2015 *)
  • PARI
    x='x+O('x^50); Vec((1-4*x-sqrt((1-4*x)*(1-4*x-4*x^2)))/(2*x^2)) \\ G. C. Greubel, Apr 08 2017

Formula

a(n) = Sum_{i=0..floor(n/2)}4^(n-2i)*C(i)*binomial(n-i-1,n), where C(i) is the i-th Catalan number A000108.
G.f.: (1-4*x-sqrt((1-4*x)*(1-4*x-4*x^2)))/(2*x^2).
a(n) ~ 2^(n+3/4) * (1+sqrt(2))^(n+1/2) / (sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Apr 22 2015
a(n) = ((-16*n + 40)*a(n-3) + (-12*n+12)*a(n-2) +(8*n+4)*a(n-1))/(n+2). - Robert Israel, Apr 22 2015