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!)
A132419 Period 6: repeat [1, 1, -2, -1, -1, 2]. 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, -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, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

LINKS

Table of n, a(n) for n=0..94.

Index entries for linear recurrences with constant coefficients, signature (0,0,-1).

FORMULA

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

a(n) = (1/6)*{(n mod 6)-[(n+1) mod 6]-[(n+3) mod 6]+[(n+4) mod 6]}. - Paolo P. Lava, Nov 19 2007

From Wesley Ivan Hurt, Jun 21 2016: (Start)

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

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

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

MAPLE

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

MATHEMATICA

PadRight[{}, 100, {1, 1, -2, -1, -1, 2}] (* Wesley Ivan Hurt, Jun 21 2016 *)

PROG

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

(MAGMA) &cat [[1, 1, -2, -1, -1, 2]^^20]; // Wesley Ivan Hurt, Jun 21 2016

CROSSREFS

Cf. A061347.

Sequence in context: A131713 A100063 A057079 * A131556 A107751 A132367

Adjacent sequences:  A132416 A132417 A132418 * A132420 A132421 A132422

KEYWORD

sign,easy,less

AUTHOR

Paul Curtz, Nov 13 2007

EXTENSIONS

Comment changed to formula by Wesley Ivan Hurt, Jun 21 2016

STATUS

approved

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 September 29 18:27 EDT 2020. Contains 337432 sequences. (Running on oeis4.)