OFFSET
0,6
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1).
FORMULA
a(n) = a(n-1) + a(n-5) - a(n-6).
a(n) = -1 + ((5 + sqrt(5))/10)*cos(4*Pi*n/5) - sqrt(((5 - sqrt(5))/250)*sin(4*Pi*n/5) + ((5-sqrt(5))/10)*cos(2*Pi*n/5) + sqrt((5+sqrt(5))/250)*sin(2*Pi*n/5) + (2*n + 5)/5.
MATHEMATICA
CoefficientList[Series[(1-x+x^2+x^5)/((1-x)(1-x^5)), {x, 0, 80}], x] (* or *) LinearRecurrence[{1, 0, 0, 0, 1, -1}, {1, 0, 1, 1, 1, 3}, 80] (* Harvey P. Dale, Jan 01 2016 *)
PROG
(Magma) R<x>:=PowerSeriesRing(Integers(), 80); Coefficients(R!( (1-x+x^2+x^5)/((1-x)*(1-x^5)) )); // G. C. Greubel, Jun 03 2021
(Sage)
def A117451_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1-x+x^2+x^5)/((1-x)*(1-x^5)) ).list()
A117451_list(80) # G. C. Greubel, Jun 03 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Mar 16 2006
STATUS
approved