A091526 Coefficient of x^n in 1/((1+x)*(1-x)^(n-1)).
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
Keywords
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
Crossrefs
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
Comments