OFFSET
0,1
COMMENTS
Periodic with period 24. - Joerg Arndt, Apr 11 2013
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..5000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,1,0,0,0,-1).
FORMULA
G.f.: (2+x+3*x^2+4*x^3-x^4+x^5-4*x^6-x^7)/(1-x^4+x^8). - Colin Barker, Apr 11 2013
MATHEMATICA
M[0]= {{0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}, {1, 0, 0, 1}}; M[1]= {{0, 1, 0, 0}, {0, 0, 1, 0}, {0, 0, 0, 1}, {1, -1, 0, 0}}; v[0]= {2, 1, 3, 4}; v[n_]:= v[n]= M[Mod[n, 2]].v[n-1]; Table[v[n][[1]], {n, 0, 100}]
LinearRecurrence[{0, 0, 0, 1, 0, 0, 0, -1}, {2, 1, 3, 4, 1, 2, -1, 3}, 85] (* Ray Chandler, Aug 27 2015 *)
PROG
(PARI) my(x='x+O('x^85)); Vec((2+x+3*x^2+4*x^3-x^4+x^5-4*x^6-x^7)/(1-x^4+x^8)) \\ G. C. Greubel, Apr 24 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 85); Coefficients(R!( (2+x+ 3*x^2+4*x^3-x^4+x^5-4*x^6-x^7)/(1-x^4+x^8) )); // G. C. Greubel, Apr 24 2019
(Sage) ((2+x+3*x^2+4*x^3-x^4+x^5-4*x^6-x^7)/(1-x^4+x^8)).series(x, 85).coefficients(x, sparse=False) # G. C. Greubel, Apr 24 2019
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Roger L. Bagula, Nov 07 2008
EXTENSIONS
New name from Joerg Arndt, Apr 11 2013
STATUS
approved