OFFSET
0,2
COMMENTS
Row 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 (0,0,2,0,0,-1).
FORMULA
a(n) = 2*a(n-3) - a(n-6).
a(n) = Sum_{k=0..n} 2^abs(L(C(n,2)/3) - L(C(k,2)/3)), L(j/p) the Legendre symbol of j and p.
MATHEMATICA
CoefficientList[Series[(1+2x+5x^2+3x^3+2x^4)/(1-x^3)^2, {x, 0, 90}], x] (* or *) LinearRecurrence[{0, 0, 2, 0, 0, -1}, {1, 2, 5, 5, 6, 10}, 90] (* Harvey P. Dale, Dec 18 2013 *)
PROG
(Magma) I:=[1, 2, 5, 5, 6, 10]; [n le 6 select I[n] else 2*Self(n-3) - Self(n-6): n in [1..91]]; // G. C. Greubel, Oct 01 2021
(Sage)
def A117899_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1+2*x+5*x^2+3*x^3+2*x^4)/(1-x^3)^2 ).list()
A117899_list(90) # G. C. Greubel, Oct 01 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Apr 01 2006
STATUS
approved