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!)
A175922 Period 5: repeat [1, 1, 2, -1, 2]. 2
1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2, 1, 1, 2, -1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
FORMULA
a(n) = 1 + (2/5)*(cos(2*n*Pi/5) + cos(4*n*Pi/5) - 2*cos(2*(n+1)*Pi/5) - sin((4*n+3)*Pi/10) + 2*sin((8*n+3)*Pi/10) + sin((8*n+1)*Pi/10)). - Wesley Ivan Hurt, Sep 27 2018
G.f.: x*(1 + x + 2*x^2 - x^3 + 2*x^4) / (1 - x^5). - Vincenzo Librandi, Sep 28 2018
a(n) = a(n-5). - Wesley Ivan Hurt, Jun 25 2022
MAPLE
seq(op([1, 1, 2, -1, 2]), n=1..30); # Muniru A Asiru, Sep 28 2018
MATHEMATICA
PadRight[{}, 100, {1, 1, 2, -1, 2}] (* Vincenzo Librandi, Sep 28 2018 *)
PROG
(PARI) a(n)=[2, 1, 1, 2, -1][n%5+1] \\ Charles R Greathouse IV, Jul 17 2016
(Magma) &cat[[1, 1, 2, -1, 2]^^20]; // Vincenzo Librandi, Sep 28 2018
(GAP) Flat(List([1..30], n->[1, 1, 2, -1, 2])); # Muniru A Asiru, Sep 28 2018
CROSSREFS
Sequence in context: A279205 A105690 A214364 * A214856 A006337 A214848
KEYWORD
sign,easy,less
AUTHOR
Jaroslav Krizek, Oct 17 2010
EXTENSIONS
Edited by Joerg Arndt, Sep 16 2013
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 March 28 05:39 EDT 2024. Contains 371235 sequences. (Running on oeis4.)