The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A131670 Period 5: repeat [1, 0, -1, 0, 1]. 1
1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0, -1, 0, 1, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
G.f.: ( -1+x^2-x^4 ) / ( (x-1)*(1+x+x^2+x^3+x^4) ). - R. J. Mathar, Apr 02 2011
a(n) = (2/5)*(1/2 + cos(4*(n-4)*Pi/5) - cos(2*(n-2)*Pi/5) - cos(4*(n-2)*Pi/5) + cos(2*n*Pi/5) + cos(4*n*Pi/5) + cos(2*(n+1)*Pi/5)). - Wesley Ivan Hurt, Sep 26 2018
MAPLE
seq(op([1, 0, -1, 0, 1]), n=1..30); # Muniru A Asiru, Sep 29 2018
MATHEMATICA
PadRight[{}, 120, {1, 0, -1, 0, 1}] (* Harvey P. Dale, May 22 2012 *)
PROG
(PARI) a(n)=abs(n%5-2)-1 \\ Jaume Oliver Lafont, Aug 28 2009
(GAP) Flat(List([1..30], n->[1, 0, -1, 0, 1])); # Muniru A Asiru, Sep 29 2018
(Magma) &cat[[1, 0, -1, 0, 1]^^20]; // Vincenzo Librandi, Oct 02 2018
CROSSREFS
Sequence in context: A341150 A244220 A283963 * A188044 A287523 A288932
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Oct 03 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 9 22:16 EDT 2024. Contains 373251 sequences. (Running on oeis4.)