login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A084780
a(n) = sum of absolute-valued coefficients of (1+3*x-x^2)^n.
8
1, 5, 21, 77, 291, 1119, 3523, 15007, 50923, 182669, 701121, 2379129, 8909361, 32490021, 106309861, 423990203, 1456199483, 5089398187, 19942506259, 65753622619, 252337832801, 903751067081, 3026099773993, 11771846189609
OFFSET
0,2
COMMENTS
The expansion of (1 + a*x - b*x^2)^n is: (1 + a*x - b*x^2)^n = Sum_{k=0..2*n} f(n, k)*x^k, where f(n, k) = (n!/(2*n-k)!) * (-b)^((k-n)/2) * (a^2 + 4*b)^(n/2) * LegendreP(n, n-k, a/sqrt(a^2 + 4*b)). - G. C. Greubel, Jun 04 2023
LINKS
FORMULA
a(n) = Sum_{k=0..2*n} abs(f(n, k)), where f(n, k) = (n!/(2*n-k)!) * i^(k-n)*(13)^(n/2)*LegendreP(n, n-k, 3/sqrt(13)).. - G. C. Greubel, Jun 04 2023
MATHEMATICA
Table[Total[Abs[CoefficientList[Expand[(1+3x-x^2)^n], x]]], {n, 0, 30}] (* Harvey P. Dale, Jan 04 2012 *)
PROG
(PARI) for(n=0, 40, S=sum(k=0, 2*n, abs(polcoeff((1+3*x-x^2)^n, k, x))); print1(S", "))
(Magma)
m:=40;
R<x>:=PowerSeriesRing(Integers(), 2*(m+2));
f:= func< n, k | Coefficient(R!( (1+3*x-x^2)^n ), k) >;
[(&+[ Abs(f(n, k)): k in [0..2*n]]): n in [0..m]]; // G. C. Greubel, Jun 04 2023
(SageMath)
def f(n, k):
P.<x> = PowerSeriesRing(QQ)
return P( (1+3*x-x^2)^n ).list()[k]
def a(n): return sum( abs(f(n, k)) for k in range(2*n+1) )
[a(n) for n in range(41)] # G. C. Greubel, Jun 04 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jun 14 2003
STATUS
approved