OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,1,-2,1).
FORMULA
a(n) = 2*a(n-1) - a(n-2) + a(n-5) - 2*a(n-6) + a(n-7).
a(n) = Sum_{k=0..n} binomial(n-k, L(k/5))}, where L(j/p) is the Legendre symbol of j and p.
a(n) = ((5 - sqrt(5))/50)*cos(2*Pi*(2*n+1)/5) + sqrt(((5 +sqrt(5))/50)*sin(2*Pi*(2*n+1)/5) - ((5 + sqrt(5))/50)*cos(Pi*(2*n+1)/5) + sqrt(((5 -sqrt(5))/50)*sin(Pi*(2*n+1)/5) + (n^2 + n + 3)/5.
MATHEMATICA
CoefficientList[Series[(1-x+x^2+x^5)/((1-x)^2(1-x^5)), {x, 0, 80}], x] (* Harvey P. Dale, Nov 22 2018 *)
PROG
(Magma) R<x>:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (1-x+x^2+x^5)/((1-x)^2*(1-x^5)) )); // G. C. Greubel, Jun 03 2021
(Sage)
def A117450_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1-x+x^2+x^5)/((1-x)^2*(1-x^5)) ).list()
A117450_list(60) # G. C. Greubel, Jun 03 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Mar 16 2006
STATUS
approved