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.

A111160 G.f.: C - Z; where C is the g.f. for the Catalan numbers (A000108) and Z is the g.f. for A055113 with offset 0.

Original entry on oeis.org

0, 1, 1, 4, 9, 31, 91, 309, 1009, 3481, 11956, 42065, 148655, 532039, 1915369, 6950452, 25357233, 93034813, 342888250, 1269246437, 4715945712, 17583623988, 65766726906, 246694006971, 927801717255, 3497918129001, 13217196871126, 50046561077947
Offset: 0

Views

Author

N. J. A. Sloane, Oct 22 2005

Keywords

Comments

Expressible in terms of ballot numbers.
Number of positive walks with n steps {-2,-1,1,2} starting at the origin, ending at altitude 2, and staying strictly above the x-axis. - David Nguyen, Dec 16 2016

Crossrefs

Programs

  • Magma
    I:=[1,1,4]; [0] cat [n le 3 select I[n] else (n*(115*n^3 - 344*n^2 + 299*n - 82)*Self(n-1) + 4*(2*n-3)*(5*n^3 + 27*n^2 - 74*n + 30)*Self(n-2) - 36*(n-2)*(2*n-5)*(2*n-3)*(5*n-3)*Self(n-3))/(2*n*(n+1)*(2*n+1)*(5*n-8)): n in [1..30]]; // Vincenzo Librandi, Oct 06 2015
  • Maple
    a := n -> (-1)^(n+1)*binomial(2*n+1,n)*hypergeom([-n-1,n/2+1/2,n/2],[n,n+1],4)/ (2*n+1);
    [0, op([seq(round(evalf(a(n),32)), n=1..27)])]; # Peter Luschny, Oct 06 2015
  • Mathematica
    CoefficientList[ Series[ -((-3 + Sqrt[1 - 4*x] + Sqrt[2]*Sqrt[1 + Sqrt[1 - 4x] + 6x])/(4x)), {x, 0, 10}], x] (* Robert G. Wilson v *)
  • PARI
    a(n) = if(n==0, 0, sum(k=0, (n+1)/2, binomial(n-k,n-2*k+1)*binomial(2*n+1,k))/(2*n+1)); \\ Altug Alkan, Oct 05 2015
    

Formula

Let C := (1 - sqrt(1 - 4*x)) / (2*x), Z := (- 1/4 - (1/4)*(1 - 4*x)^(1/2) + (1/4)*(2 + 2*(1 - 4*x)^(1/2) + 12*x)^(1/2))/x; g.f. is W := C - Z.
G.f.: -((-3 + sqrt(1 - 4x) + sqrt(2)*sqrt(1 + sqrt(1 - 4x) + 6x))/(4x)).
a(n) = sum(j=0..n+1, binomial(n+2*j-1,j)*(-1)^(n+j+1)*binomial(2*n+1,j+n))/(2*n+1). [Vladimir Kruchinin, Feb 15 2013]
a(n) ~ (1+1/sqrt(5))*2^(2*n-1)/(sqrt(Pi)*n^(3/2)). - Vaclav Kotesovec, Aug 13 2013
Recurrence: 2*n*(n+1)*(2*n+1)*(5*n-8)*a(n) = n*(115*n^3 - 344*n^2 + 299*n - 82)*a(n-1) + 4*(2*n-3)*(5*n^3 + 27*n^2 - 74*n + 30)*a(n-2) - 36*(n-2)*(2*n-5)*(2*n-3)*(5*n-3)*a(n-3). - Vaclav Kotesovec, Aug 13 2013
a(n) = Sum_{j=0..(n+1)/2}(binomial(n-j,n-2*j+1)*binomial(2*n+1,j))/(2*n+1). - Vladimir Kruchinin, Oct 05 2015
a(n) = (-1)^(n+1)*C(2*n+1,n)*hypergeom([-n-1,n/2+1/2,n/2],[n,n+1],4)/(2*n+1) for n>0. - Peter Luschny, Oct 06 2015