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!)
A093718 a(n) = (n mod 3)^(n mod 2). 3

%I #27 Sep 08 2022 08:45:13

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

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

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

%N a(n) = (n mod 3)^(n mod 2).

%C Period 6: repeat [1, 1, 1, 0, 1, 2]. - _Joerg Arndt_, Jun 09 2013

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

%F a(n) = A010872(n)^A000035(n).

%F G.f.: ( -1-x^2-2*x^4+x^3 ) / ( (x-1)*(1-x+x^2)*(1+x+x^2) ). - _R. J. Mathar_, Jun 09 2013

%F a(n) = (n + 3) mod (2 + n mod 2) - _Wesley Ivan Hurt_, Aug 16 2014

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

%F a(n) = cos(n*Pi/6) * (6*cos(n*Pi/6)-3*cos(n*Pi/2)-sqrt(3)*sin(n*Pi/2))/3.

%F a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5).

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

%p A093718:=n->(n mod 3)^(n mod 2): seq(A093718(n), n=0..100); # _Wesley Ivan Hurt_, Aug 16 2014

%t Table[Mod[n + 3, 2 + Mod[n, 2]], {n, 0, 100}] (* _Wesley Ivan Hurt_, Aug 16 2014 *)

%t LinearRecurrence[{1,-1,1,-1,1},{1,1,1,0,1},120] (* _Harvey P. Dale_, Jan 17 2021 *)

%o (Magma) &cat [[1, 1, 1, 0, 1, 2]^^20]; // _Wesley Ivan Hurt_, Jun 23 2016

%Y Cf. A000035, A010872, A093719.

%K nonn,easy

%O 0,6

%A _Reinhard Zumkeller_, Apr 12 2004

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 May 16 17:27 EDT 2024. Contains 372554 sequences. (Running on oeis4.)