login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A084778 a(n) = sum of absolute-valued coefficients of (1+2*x-3*x^2)^n. 8

%I #9 Jun 04 2023 02:15:21

%S 1,6,28,128,660,3016,13108,64112,304068,1332992,6514356,29341384,

%T 131904528,623547112,2990903464,13436119424,61647598484,284398511848,

%U 1302463169256,6195158123688,28653898573420,130138400720504

%N a(n) = sum of absolute-valued coefficients of (1+2*x-3*x^2)^n.

%H G. C. Greubel, <a href="/A084778/b084778.txt">Table of n, a(n) for n = 0..1000</a>

%F a(n) = Sum_{k=0..2*n} abs(f(n,k)), where f(n, k) = Sum_{j=0..k} binomial(n, j)*binomial(n, k-j)*(-3)^j = binomial(n, k)*Hypergeometric2F1([-n, -k], [n-k+1], -3) = (n!/k!)*4^n*(-3)^((k-n)/2)*LegendreP(n, k-n, -1/2). - _G. C. Greubel_, Jun 04 2023

%t T[n_,k_]:=T[n,k]=SeriesCoefficient[Series[(1+2*x-3*x^2)^n,{x,0,2n}], k];

%t a[n_]:= a[n]= Sum[Abs[T[n,k]], {k,0,2n}];

%t Table[a[n], {n,0,40}] (* _G. C. Greubel_, Jun 04 2023 *)

%o (PARI) for(n=0,40,S=sum(k=0,2*n,abs(polcoeff((1+2*x-3*x^2)^n,k,x))); print1(S","))

%o (Magma)

%o m:=40;

%o R<x>:=PowerSeriesRing(Integers(), 2*(m+2));

%o f:= func< n,k | Coefficient(R!( (1+2*x-3*x^2)^n ), k) >;

%o [(&+[ Abs(f(n,k)): k in [0..2*n]]): n in [0..m]]; // _G. C. Greubel_, Jun 04 2023

%o (SageMath)

%o def f(n,k):

%o P.<x> = PowerSeriesRing(QQ)

%o return P( (1+2*x-3*x^2)^n ).list()[k]

%o def a(n): return sum( abs(f(n,k)) for k in range(2*n+1) )

%o [a(n) for n in range(41)] # _G. C. Greubel_, Jun 04 2023

%Y Cf. A084775, A084776, A084777, A084779, A084780.

%K nonn

%O 0,2

%A _Paul D. Hanna_, Jun 14 2003

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 03:33 EDT 2024. Contains 371767 sequences. (Running on oeis4.)