|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|