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!)
A079757 Periodic sequence 1, 0, -2, 3, -2, 0, ... 4
1, 0, -2, 3, -2, 0, 1, 0, -2, 3, -2, 0, 1, 0, -2, 3, -2, 0, 1, 0, -2, 3, -2, 0, 1, 0, -2, 3, -2, 0, 1, 0, -2, 3, -2, 0, 1, 0, -2, 3, -2, 0, 1, 0, -2, 3, -2, 0, 1, 0, -2, 3, -2, 0, 1, 0, -2, 3, -2, 0, 1, 0, -2, 3, -2, 0, 1, 0, -2, 3, -2, 0, 1, 0, -2, 3, -2, 0, 1, 0, -2, 3, -2, 0, 1, 0, -2, 3, -2, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) = A057079(2*n+1) - (-1)^floor((2*n+1)/2).
G.f.: (1+2*x)/(1+2*x+2*x^2+x^3).
a(n) = -2*a(n-1) - 2*a(n-2) - a(n-3).
a(n) = |Real(2*(sqrt(3/4)*i - 1/2)^n - (-1)^n )|, where i = sqrt(-1). - Ralf Stephan, Mar 07 2003
MATHEMATICA
PadRight[{}, 120, {1, 0, -2, 3, -2, 0}] (* G. C. Greubel, Mar 27 2024 *)
PROG
(Magma) &cat[[1, 0, -2, 3, -2, 0]: n in [0..20]]; // G. C. Greubel, Mar 27 2024
(SageMath)
def A079757(n): return [1, 0, -2, 3, -2, 0][n%6]
[A079757(n) for n in range(121)] # G. C. Greubel, Mar 27 2024
CROSSREFS
Cf. A057079.
Sequence in context: A019509 A071484 A100219 * A071493 A289813 A050075
KEYWORD
easy,sign
AUTHOR
Mario Catalani (mario.catalani(AT)unito.it), Jan 10 2003
STATUS
approved

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 12:44 EDT 2024. Contains 371913 sequences. (Running on oeis4.)