login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A242073
a(n) = - (a(n-1)*a(n-4) + a(n-2)*a(n-3)) / a(n-5) with a(0)=1, a(1)=a(2)=-1, a(3)=-2, a(4)=1.
1
1, -1, -1, -2, 1, -1, -1, 1, 1, 2, -1, 1, 1, -1, -1, -2, 1, -1, -1, 1, 1, 2, -1, 1, 1, -1, -1, -2, 1, -1, -1, 1, 1, 2, -1, 1, 1, -1, -1, -2, 1, -1, -1, 1, 1, 2, -1, 1, 1, -1, -1, -2, 1, -1, -1, 1, 1, 2, -1, 1, 1, -1, -1, -2, 1, -1, -1, 1, 1, 2, -1, 1, 1, -1
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
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
Cf. A057079.
Sequence in context: A304118 A319679 A364388 * A245477 A319689 A373216
KEYWORD
sign,easy
AUTHOR
Michael Somos, Aug 14 2014
STATUS
approved