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.

A091526 Coefficient of x^n in 1/((1+x)*(1-x)^(n-1)).

Original entry on oeis.org

1, -1, 1, 2, 9, 34, 130, 496, 1897, 7274, 27966, 107788, 416394, 1611908, 6251596, 24287212, 94499689, 368202778, 1436458486, 5610483532, 21936442894, 85852554748, 336300861436, 1318441228432, 5172792817834, 20309402206084
Offset: 0

Views

Author

Michael Somos, Jan 18 2004

Keywords

Comments

Number of positive terms in expansion of (x_1+x_2+...+x_{n-1}-x_n)^(n+1). - Sergio Falcon, Feb 08 2007
Without the beginning "1" and "-1", we obtain the second diagonal over the principal diagonal of the array notified by B. Cloitre in A026641 and used by R. Choulet in A172025, and from A172061 to A172066. - Richard Choulet, Jan 25 2010

Crossrefs

Cf. A172025, A172061-A172066. - Richard Choulet, Jan 25 2010
Cf. A072547 (k=-1), A026641 (k=0), A014300 (k=1), A014301 (k=2), A172025 (k=3), A172061 (k=4), A172062 (k=5), A172063 (k=6), A172064 (k=7), A172065 (k=8), A172066 (k=9), A172067 (k=10).

Programs

  • Magma
    k:=-2; m:=30; R:=PowerSeriesRing(Rationals(), m); Coefficients(R!( (2/(3*Sqrt(1-4*x)-1+4*x))*((1-Sqrt(1-4*x))/(2*x))^k )); // G. C. Greubel, Feb 18 2019
    
  • Maple
    for n from 0 to 40 do a(n):=sum('(-1)^(p)*binomial(2*n-p+2,2+n-p)',p=0..n+2): od:seq(a(n),n=0..40):od; taylor((2/(3*sqrt(1-4*z)-1+4*z))*((1-sqrt(1-4*z))/(2*z))^(-2),z=0,42); # Richard Choulet, Jan 25 2010
  • Mathematica
    Table[Sum[Binomial[n+i-2, i]*(-1)^(n-i),{i,0,n}],{n,0,20}] (* Vaclav Kotesovec, Apr 19 2014 *)
    Table[(-1)^n 2^(1-n)+Binomial[-1+2 n,1+n] Hypergeometric2F1[1,2 n,2+n,-1],{n,0,20}] (* Vaclav Kotesovec, Apr 19 2014 *)
    With[{k = -2}, CoefficientList[Series[(2/(3*Sqrt[1-4*x]-1+4*x))*((1 - Sqrt[1-4*x])/(2*x))^k, {x, 0, 30}], x]] (* G. C. Greubel, Feb 18 2019 *)
  • PARI
    a(n)=sum(i=0,n,binomial(n+i-2,i)*(-1)^(n-i));
    
  • PARI
    k=-2; my(x='x+O('x^30)); Vec((2/(3*sqrt(1-4*x)-1+4*x))*((1-sqrt(1-4*x))/(2*x))^k) \\ G. C. Greubel, Feb 18 2019
    
  • Sage
    k=-2; ((2/(3*sqrt(1-4*x)-1+4*x))*((1-sqrt(1-4*x))/(2*x))^k).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Feb 18 2019

Formula

From Richard Choulet, Jan 25 2010: (Start)
G.f: f such as: f(z)=(2/(3*sqrt(1-4*z)-1+4*z))*((1-sqrt(1-4*z))/(2*z))^(-2).
a(n) = Sum_{j=0..n+2} (-1)^j*binomial(2*n-j+2, 2+n-j). (End)
Recurrence: 2*n*(3*n-7)*a(n) = (21*n^2 - 61*n + 48)*a(n-1) + 2*(2*n-3)*(3*n-4)*a(n-2). - Vaclav Kotesovec, Apr 19 2014
a(n) ~ 2^(2*n-1)/(3*sqrt(Pi*n)). - Vaclav Kotesovec, Apr 19 2014