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!)
A132419 Period 6: repeat [1, 1, -2, -1, -1, 2]. 2

%I #22 Dec 12 2023 09:15:08

%S 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,

%T -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,

%U 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,-1

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

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

%F a(n) = A061347(n+1) * (-1)^floor(n/3).

%F From _Wesley Ivan Hurt_, Jun 21 2016: (Start)

%F G.f.: (1+x-2*x^2)/(1+x^3).

%F a(n) + a(n-3) = 0 for n>2.

%F a(n) = (5*cos(n*Pi/3) - 2*cos(n*Pi) - sqrt(3)*sin(n*Pi/3))/3. (End)

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

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

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

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

%Y Cf. A061347.

%K sign,easy,less

%O 0,3

%A _Paul Curtz_, Nov 13 2007

%E Comment changed to formula by _Wesley Ivan Hurt_, Jun 21 2016

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 11:06 EDT 2024. Contains 371905 sequences. (Running on oeis4.)