OFFSET
0,4
COMMENTS
Period 12: repeat [1, -1, -1, -2, 1, -1, -1, 1, 1, 2, -1, 1]. - Wesley Ivan Hurt, Aug 29 2014
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..11999
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,-1).
FORMULA
a(n) = -a(n+6) = (-1)^n * a(-n), a(2*n) = (-1)^n for all n in Z.
a(2*n+1) = - A057079(n). - Robert Israel, Aug 29 2014
0 = a(n)*a(n+5) + a(n+1)*a(n+4) + a(n+2)*a(n+3) for all n in Z.
G.f.: (1 - x - x^2 - 2*x^3 + x^4 - x^5) / (1 + x^6).
G.f. can be written as 1/(1+x^2) + x*(1+x^2)/(1-x^2+x^4). - Robert Israel, Aug 29 2014
a(n) = ((-1)^(n/2)+(-1)^(3*n/2)+(-1)^((3+n)/6)-(-1)^((3-n)/6)+(-1)^((3-7*n)/6)-(-1)^((3+7*n)/6))/2. - Wesley Ivan Hurt, Jul 21 2015
EXAMPLE
G.f. = 1 - x - x^2 - 2*x^3 + x^4 - x^5 - x^6 + x^7 + x^8 + 2*x^9 - x^10 + ...
MAPLE
A242073:=proc(n) option remember;
if n=0 then 1 elif n=1 then -1 elif n=2 then -1 elif n=3 then -2 elif n=4 then 1 elif n=5 then -1 else -A242073(n-6); fi; end: seq(A242073(n), n=0..100); # Wesley Ivan Hurt, Jul 21 2015
MATHEMATICA
CoefficientList[Series[(1 - x - x^2 - 2 x^3 + x^4 - x^5)/(1 + x^6), {x, 0, 100}], x] (* Wesley Ivan Hurt, Aug 29 2014 *)
LinearRecurrence[{0, 0, 0, 0, 0, -1}, {1, -1, -1, -2, 1, -1}, 100] (* Vincenzo Librandi, Jul 22 2015 *)
PROG
(PARI) {a(n) = (-1)^(n\6) * [1, -1, -1, -2, 1, -1][n%6 + 1]};
(Magma) I:=[1, -1, -1, -2, 1, -1]; [n le 6 select I[n] else -Self(n-6): n in [1..100]]; // Vincenzo Librandi, Jul 22 2015
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Michael Somos, Aug 14 2014
STATUS
approved