%I #24 Sep 08 2022 08:45:12
%S 1,-1,1,2,9,34,130,496,1897,7274,27966,107788,416394,1611908,6251596,
%T 24287212,94499689,368202778,1436458486,5610483532,21936442894,
%U 85852554748,336300861436,1318441228432,5172792817834,20309402206084
%N Coefficient of x^n in 1/((1+x)*(1-x)^(n-1)).
%C Number of positive terms in expansion of (x_1+x_2+...+x_{n-1}-x_n)^(n+1). - _Sergio Falcon_, Feb 08 2007
%C 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
%H Vincenzo Librandi, <a href="/A091526/b091526.txt">Table of n, a(n) for n = 0..200</a>
%F From _Richard Choulet_, Jan 25 2010: (Start)
%F G.f: f such as: f(z)=(2/(3*sqrt(1-4*z)-1+4*z))*((1-sqrt(1-4*z))/(2*z))^(-2).
%F a(n) = Sum_{j=0..n+2} (-1)^j*binomial(2*n-j+2, 2+n-j). (End)
%F 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
%F a(n) ~ 2^(2*n-1)/(3*sqrt(Pi*n)). - _Vaclav Kotesovec_, Apr 19 2014
%p 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
%t Table[Sum[Binomial[n+i-2, i]*(-1)^(n-i),{i,0,n}],{n,0,20}] (* _Vaclav Kotesovec_, Apr 19 2014 *)
%t 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 *)
%t 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 *)
%o (PARI) a(n)=sum(i=0,n,binomial(n+i-2,i)*(-1)^(n-i));
%o (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
%o (Magma) k:=-2; m:=30; R<x>:=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
%o (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
%Y Cf. A172025, A172061-A172066. - _Richard Choulet_, Jan 25 2010
%Y 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).
%K sign
%O 0,4
%A _Michael Somos_, Jan 18 2004