%I #48 Dec 14 2023 05:32:53
%S 1,0,-2,0,1,0,1,0,-2,0,1,0,1,0,-2,0,1,0,1,0,-2,0,1,0,1,0,-2,0,1,0,1,0,
%T -2,0,1,0,1,0,-2,0,1,0,1,0,-2,0,1,0,1,0,-2,0,1,0,1,0,-2,0,1,0,1,0,-2,
%U 0,1,0,1,0,-2,0,1,0,1,0,-2,0,1,0,1,0,-2,0
%N Expansion of (1-x^2)/(1+x^2+x^4).
%C Periodic: repeat [1, 0, -2, 0, 1, 0].
%C 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
%H Vincenzo Librandi, <a href="/A117188/b117188.txt">Table of n, a(n) for n = 0..1000</a>
%H Gregory T. Minton, <a href="http://dx.doi.org/10.1090/S0002-9939-2014-12168-X">Linear recurrence sequences satisfying congruence conditions</a>, Proc. Amer. Math. Soc. 142 (2014), no. 7, 2337--2352. MR3195758. See Example 6.13. - _N. J. A. Sloane_, Jul 09 2014
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,-1,0,-1).
%F G.f.: (1 - 2*x^2 + x^4)/(1-x^6).
%F a(n) = (1 + (-1)^n)/(-2 + 4^(floor((n-1)/3) - 2*floor((n-1)/6))). - _Tani Akinari_, Aug 02 2013
%F a(n) = -a(n-2) - a(n-4) for n >= 4. - _N. J. A. Sloane_, Jul 09 2014
%F From _Wesley Ivan Hurt_, Jun 23 2016: (Start)
%F a(n) = a(n-6) for n>5.
%F a(n) = cos(n*Pi/2) * (cos(n*Pi/6) + sqrt(3)*sin(n*Pi/6)). (End)
%F 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
%F a(n) = cos((n+1)*Pi/3) - cos(2*(n+1)*Pi/3). - _Ridouane Oudra_, Dec 14 2021
%p A117188:=n->[1, 0, -2, 0, 1, 0][(n mod 6)+1]: seq(A117188(n), n=0..100); # _Wesley Ivan Hurt_, Jun 23 2016
%t PadRight[{}, 100, {1, 0, -2, 0, 1, 0}] (* _Wesley Ivan Hurt_, Jun 23 2016 *)
%t LinearRecurrence[{0,-1,0,-1},{1,0,-2,0},100] (* _Harvey P. Dale_, Jun 25 2022 *)
%o (Magma) &cat [[1, 0, -2, 0, 1, 0]^^20]; // _Wesley Ivan Hurt_, Jun 23 2016
%Y Row sums of A117185.
%K sign,easy
%O 0,3
%A _Paul Barry_, Mar 01 2006
|