OFFSET
0,3
COMMENTS
Diagonal sums of A117898.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-1,0,2,2,0,-1,-1).
FORMULA
a(n) = -a(n-1) + 2*a(n-3) + 2*a(n-4) - a(n-6) - a(n-7).
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.
MATHEMATICA
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 *)
PROG
(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
(Sage)
def A117899_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1+2*x+4*x^2+4*x^3+2*x^4)/((1+x)*(1-x^3)^2) ).list()
A117899_list(80) # G. C. Greubel, Oct 01 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Apr 01 2006
STATUS
approved