login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A131556 Period 6: repeat [1, -2, 1, -1, 2, -1]. 7

%I #26 Dec 12 2023 09:18:26

%S 1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,

%T -1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,

%U 1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1,1,-2,1,-1,2,-1

%N Period 6: repeat [1, -2, 1, -1, 2, -1].

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,-1).

%F G.f.: (x-1)^2/(x+1)/(x^2-x+1). - _R. J. Mathar_, Nov 14 2007

%F a(n) = (-1)^n * A131534(n). - _R. J. Mathar_, Apr 02 2011

%F a(n) = -cos(Pi*n/3)/3 -sin(Pi*n/3)/sqrt(3) +4*(-1)^n/3. - _R. J. Mathar_, Oct 08 2011

%F a(n) + a(n-3) = 0 for n>2. - _Wesley Ivan Hurt_, Jun 19 2016

%p A131556:=n->[1, -2, 1, -1, 2, -1][(n mod 6)+1]: seq(A131556(n), n=0..100); # _Wesley Ivan Hurt_, Jun 19 2016

%t PadRight[{}, 100, {1, -2, 1, -1, 2, -1}] (* _Wesley Ivan Hurt_, Jun 19 2016 *)

%o (PARI) a(n)=[1,-2,1,-1,2,-1][n%6+1] \\ _Charles R Greathouse IV_, Jun 02 2011

%o (Magma) &cat[[1, -2, 1, -1, 2, -1]^^20]; // _Wesley Ivan Hurt_, Jun 19 2016

%Y Cf. A131534.

%K sign,easy,less

%O 0,2

%A _Paul Curtz_, Aug 27 2007

%E Edited by _N. J. A. Sloane_, Sep 15 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 15:20 EDT 2024. Contains 371916 sequences. (Running on oeis4.)