OFFSET
0,3
COMMENTS
Periodic: repeat [1, 0, -2, 0, 1, 0].
Minton mentions that the subsequence a(2^i), i >= 1, oscillates between -2 and 1 (and does not converge 2-adically). - N. J. A. Sloane, Jul 09 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Gregory T. Minton, Linear recurrence sequences satisfying congruence conditions, Proc. Amer. Math. Soc. 142 (2014), no. 7, 2337--2352. MR3195758. See Example 6.13. - N. J. A. Sloane, Jul 09 2014
Index entries for linear recurrences with constant coefficients, signature (0,-1,0,-1).
FORMULA
G.f.: (1 - 2*x^2 + x^4)/(1-x^6).
a(n) = (1 + (-1)^n)/(-2 + 4^(floor((n-1)/3) - 2*floor((n-1)/6))). - Tani Akinari, Aug 02 2013
a(n) = -a(n-2) - a(n-4) for n >= 4. - N. J. A. Sloane, Jul 09 2014
From Wesley Ivan Hurt, Jun 23 2016: (Start)
a(n) = a(n-6) for n>5.
a(n) = cos(n*Pi/2) * (cos(n*Pi/6) + sqrt(3)*sin(n*Pi/6)). (End)
E.g.f.: cos(sqrt(3)*x/2)*cosh(x/2) - sqrt(3)*sin(sqrt(3)*x/2)*sinh(x/2). - Ilya Gutkovskiy, Jun 27 2016
a(n) = cos((n+1)*Pi/3) - cos(2*(n+1)*Pi/3). - Ridouane Oudra, Dec 14 2021
MAPLE
A117188:=n->[1, 0, -2, 0, 1, 0][(n mod 6)+1]: seq(A117188(n), n=0..100); # Wesley Ivan Hurt, Jun 23 2016
MATHEMATICA
PadRight[{}, 100, {1, 0, -2, 0, 1, 0}] (* Wesley Ivan Hurt, Jun 23 2016 *)
LinearRecurrence[{0, -1, 0, -1}, {1, 0, -2, 0}, 100] (* Harvey P. Dale, Jun 25 2022 *)
PROG
(Magma) &cat [[1, 0, -2, 0, 1, 0]^^20]; // Wesley Ivan Hurt, Jun 23 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Barry, Mar 01 2006
STATUS
approved