login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


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

%I

%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 a(n) = (1/6)*{-2*(n mod 6)+3*[(n+1) mod 6]-3*[(n+2) mod 6]+2*[(n+3) mod 6]-3*[(n+4) mod 6]+3*[(n+5) mod 6]}. - _Paolo P. Lava_, Aug 28 2007

%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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 28 01:34 EDT 2020. Contains 334671 sequences. (Running on oeis4.)