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

%I #24 Sep 08 2022 08:45:52

%S 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,

%T 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,

%U 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

%N Period 5: repeat [1, 1, 2, -1, 2].

%H Muniru A Asiru, <a href="/A175922/b175922.txt">Table of n, a(n) for n = 1..2000</a>

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,0,1).

%F 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

%F G.f.: x*(1 + x + 2*x^2 - x^3 + 2*x^4) / (1 - x^5). - _Vincenzo Librandi_, Sep 28 2018

%F a(n) = a(n-5). - _Wesley Ivan Hurt_, Jun 25 2022

%p seq(op([1,1,2,-1,2]),n=1..30); # _Muniru A Asiru_, Sep 28 2018

%t PadRight[{}, 100, {1, 1, 2, -1, 2}] (* _Vincenzo Librandi_, Sep 28 2018 *)

%o (PARI) a(n)=[2,1,1,2,-1][n%5+1] \\ _Charles R Greathouse IV_, Jul 17 2016

%o (Magma) &cat[[1, 1, 2, -1, 2]^^20]; // _Vincenzo Librandi_, Sep 28 2018

%o (GAP) Flat(List([1..30],n->[1,1,2,-1,2])); # _Muniru A Asiru_, Sep 28 2018

%Y Cf. A040001, A028356, A142150, A000012, A175921.

%K sign,easy,less

%O 1,3

%A _Jaroslav Krizek_, Oct 17 2010

%E Edited by _Joerg Arndt_, Sep 16 2013

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