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

0,2

COMMENTS

Nonsimple continued fraction expansion of (5+sqrt(13))/6 = 1.434258545... - R. J. Mathar, Mar 08 2012

LINKS

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

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

FORMULA

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

a(n) = -a(n-3) for n>2. G.f.: (1+2*x+4*x^2)/((1+x)*(x^2-x+1)). [R. J. Mathar, Apr 13 2010]

a(n) = cos(n*Pi) + 2*sqrt(3)*sin(n*Pi/3). - Wesley Ivan Hurt, Jun 20 2016

MAPLE

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

MATHEMATICA

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

PROG

(PARI) a(n)=(2^n%7)*(-1)^(n%6>2) \\ Jaume Oliver Lafont, Mar 24 2009

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

CROSSREFS

Sequence in context: A206475 A227184 A124911 * A069705 A106645 A115314

Adjacent sequences:  A132951 A132952 A132953 * A132955 A132956 A132957

KEYWORD

sign,easy

AUTHOR

Paul Curtz, Nov 19 2007

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 May 12 03:56 EDT 2021. Contains 343810 sequences. (Running on oeis4.)