login
A147567
a(n) = a(n-4) - a(n-8).
1
2, 1, 3, 4, 1, 2, -1, 3, -1, 1, -4, -1, -2, -1, -3, -4, -1, -2, 1, -3, 1, -1, 4, 1, 2, 1, 3, 4, 1, 2, -1, 3, -1, 1, -4, -1, -2, -1, -3, -4, -1, -2, 1, -3, 1, -1, 4, 1, 2, 1, 3, 4, 1, 2, -1, 3, -1, 1, -4, -1, -2, -1, -3, -4, -1, -2, 1, -3, 1, -1, 4, 1, 2, 1, 3, 4, 1, 2, -1, 3, -1, 1, -4, -1, -2
OFFSET
0,1
COMMENTS
Periodic with period 24. - Joerg Arndt, Apr 11 2013
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
Sequence in context: A322081 A279396 A161224 * A247045 A347354 A361429
KEYWORD
sign,easy
AUTHOR
Roger L. Bagula, Nov 07 2008
EXTENSIONS
New name from Joerg Arndt, Apr 11 2013
STATUS
approved