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.

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

This page as a plain text file.
%I A084777 #11 Jun 04 2023 02:22:08
%S A084777 1,5,17,73,273,881,3785,13081,48737,184321,632193,2526305,8854081,
%T A084777 32077921,124093025,428178641,1638563969,5878561921,21469361537,
%U A084777 82252171393,286863949025,1061000856417,3998983314849,14361380710817
%N A084777 a(n) = sum of absolute-valued coefficients of (1+2*x-2*x^2)^n.
%H A084777 G. C. Greubel, <a href="/A084777/b084777.txt">Table of n, a(n) for n = 0..1000</a>
%F A084777 a(n) = Sum_{k=0..2*n} abs(f(n, k)), where f(n, k) = ((sqrt(3) -1)/2)^k * Sum_{j=0..k} binomial(n, j)*binomial(n, k-j)*(-1)^j*((1+sqrt(3))/2 )^(2*j). - _G. C. Greubel_, Jun 03 2023
%t A084777 T[n_,k_]:=T[n,k]=SeriesCoefficient[Series[(1+2*x-2*x^2)^n,{x,0,2n}],k];
%t A084777 a[n_]:= a[n]= Sum[Abs[T[n,k]], {k,0,2n}];
%t A084777 Table[a[n], {n,0,40}] (* _G. C. Greubel_, Jun 03 2023 *)
%o A084777 (PARI) for(n=0,40,S=sum(k=0,2*n,abs(polcoeff((1+2*x-2*x^2)^n,k,x))); print1(S","))
%o A084777 (Magma)
%o A084777 m:=40;
%o A084777 R<x>:=PowerSeriesRing(Integers(), 2*(m+2));
%o A084777 f:= func< n,k | Coefficient(R!( (1+2*x-2*x^2)^n ), k) >;
%o A084777 [(&+[ Abs(f(n,k)): k in [0..2*n]]): n in [0..m]]; // _G. C. Greubel_, Jun 03 2023
%o A084777 (SageMath)
%o A084777 def f(n,k):
%o A084777     P.<x> = PowerSeriesRing(QQ)
%o A084777     return P( (1+2*x-2*x^2)^n ).list()[k]
%o A084777 def a(n): return sum( abs(f(n,k)) for k in range(2*n+1) )
%o A084777 [a(n) for n in range(41)] # _G. C. Greubel_, Jun 03 2023
%Y A084777 Cf. A084775, A084776, A084778, A084779, A084780.
%K A084777 nonn
%O A084777 0,2
%A A084777 _Paul D. Hanna_, Jun 14 2003