Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #13 Sep 08 2022 08:45:24
%S 1,1,3,3,3,5,6,4,8,8,6,10,11,7,13,13,9,15,16,10,18,18,12,20,21,13,23,
%T 23,15,25,26,16,28,28,18,30,31,19,33,33,21,35,36,22,38,38,24,40,41,25,
%U 43,43,27,45,46,28,48,48,30,50,51,31,53,53,33,55,56,34,58,58,36
%N Expansion of (1 + 2*x + 4*x^2 + 4*x^3 + 2*x^4)/((1+x)*(1-x^3)^2).
%C Diagonal sums of A117898.
%H G. C. Greubel, <a href="/A117900/b117900.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (-1,0,2,2,0,-1,-1).
%F a(n) = -a(n-1) + 2*a(n-3) + 2*a(n-4) - a(n-6) - a(n-7).
%F a(n) = Sum_{k=0..floor(n/2)} 2^abs(L(C(n-k,2)/3) - L(C(k,2)/3)), L(j/p) the Legendre symbol of j and p.
%t CoefficientList[Series[(1+2x+4x^2+4x^3+2x^4)/((1-x^3)(1+x-x^3-x^4)),{x,0,80}],x] (* or *) LinearRecurrence[{-1,0,2,2,0,-1,-1},{1,1,3,3,3,5,6},80] (* _Harvey P. Dale_, Mar 06 2018 *)
%o (Magma) R<x>:=PowerSeriesRing(Integers(), 70); Coefficients(R!( (1+2*x+4*x^2+4*x^3+2*x^4)/((1+x)*(1-x^3)^2) )); // _G. C. Greubel_, Oct 01 2021
%o (Sage)
%o def A117899_list(prec):
%o P.<x> = PowerSeriesRing(ZZ, prec)
%o return P( (1+2*x+4*x^2+4*x^3+2*x^4)/((1+x)*(1-x^3)^2) ).list()
%o A117899_list(80) # _G. C. Greubel_, Oct 01 2021
%Y Cf. A117898.
%K easy,nonn
%O 0,3
%A _Paul Barry_, Apr 01 2006