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.

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

This page as a plain text file.
%I A084780 #12 Jun 05 2023 08:52:46
%S A084780 1,5,21,77,291,1119,3523,15007,50923,182669,701121,2379129,8909361,
%T A084780 32490021,106309861,423990203,1456199483,5089398187,19942506259,
%U A084780 65753622619,252337832801,903751067081,3026099773993,11771846189609
%N A084780 a(n) = sum of absolute-valued coefficients of (1+3*x-x^2)^n.
%C A084780 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
%H A084780 G. C. Greubel, <a href="/A084780/b084780.txt">Table of n, a(n) for n = 0..1000</a>
%F A084780 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
%t A084780 Table[Total[Abs[CoefficientList[Expand[(1+3x-x^2)^n],x]]],{n,0,30}] (* _Harvey P. Dale_, Jan 04 2012 *)
%o A084780 (PARI) for(n=0,40,S=sum(k=0,2*n,abs(polcoeff((1+3*x-x^2)^n,k,x))); print1(S","))
%o A084780 (Magma)
%o A084780 m:=40;
%o A084780 R<x>:=PowerSeriesRing(Integers(), 2*(m+2));
%o A084780 f:= func< n,k | Coefficient(R!( (1+3*x-x^2)^n ), k) >;
%o A084780 [(&+[ Abs(f(n,k)): k in [0..2*n]]): n in [0..m]]; // _G. C. Greubel_, Jun 04 2023
%o A084780 (SageMath)
%o A084780 def f(n,k):
%o A084780     P.<x> = PowerSeriesRing(QQ)
%o A084780     return P( (1+3*x-x^2)^n ).list()[k]
%o A084780 def a(n): return sum( abs(f(n,k)) for k in range(2*n+1) )
%o A084780 [a(n) for n in range(41)] # _G. C. Greubel_, Jun 04 2023
%Y A084780 Cf. A084775, A084776, A084777, A084778, A084779.
%K A084780 nonn
%O A084780 0,2
%A A084780 _Paul D. Hanna_, Jun 14 2003