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!)
A131718 Period 6: repeat [1, 1, 2, 1, 2, 1]. 4

%I #42 Mar 08 2024 01:11:56

%S 1,1,2,1,2,1,1,1,2,1,2,1,1,1,2,1,2,1,1,1,2,1,2,1,1,1,2,1,2,1,1,1,2,1,

%T 2,1,1,1,2,1,2,1,1,1,2,1,2,1,1,1,2,1,2,1,1,1,2,1,2,1,1,1,2,1,2,1,1,1,

%U 2,1,2,1,1,1,2,1,2,1,1,1,2,1,2,1,1,1,2,1,2,1,1,1,2,1,2,1,1,1,2,1,2,1,1,1,2

%N Period 6: repeat [1, 1, 2, 1, 2, 1].

%C Decimal expansion of 112121/999999. - _Klaus Brockhaus_, May 21 2010

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

%F G.f.: (1+x+2*x^2+x^3+2*x^4+x^5)/((1-x)*(1+x)*(x^2+x+1)*(x^2-x+1)). - _R. J. Mathar_, Jan 17 2008

%F From _Wesley Ivan Hurt_, Jun 17 2016: (Start)

%F a(n) = a(n-6) for n>5.

%F a(n) = (4 + cos(n*Pi) - cos(n*Pi/3) - cos(2*n*Pi/3))/3. (End)

%p A131718:=n->(4+cos(n*Pi)-cos(n*Pi/3)-cos(2*n*Pi/3))/3: seq(A131718(n), n=0..100); # _Wesley Ivan Hurt_, Jun 17 2016

%t Flatten[Table[{1, 1, 2, 1, 2, 1}, {20}]] (* _Wesley Ivan Hurt_, Jun 17 2016 *)

%o (Magma) &cat[[1, 1, 2, 1, 2, 1]: k in [1..30]] // _Vincenzo Librandi_, Nov 23 2010

%o (PARI) a(n)=[1,1,2,1,2,1][n%6+1] \\ _Charles R Greathouse IV_, Jun 02 2011

%Y Cf. A178149 (decimal expansion of (15+sqrt(1365))/30). - _Klaus Brockhaus_, May 21 2010

%K nonn,easy,less

%O 0,3

%A _Paul Curtz_, Sep 15 2007

%E More terms from _Klaus Brockhaus_, May 21 2010

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 24 05:23 EDT 2024. Contains 371918 sequences. (Running on oeis4.)