cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A093718 a(n) = (n mod 3)^(n mod 2).

This page as a plain text file.
%I A093718 #30 Jul 26 2024 15:46:23
%S A093718 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 A093718 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 A093718 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 A093718 a(n) = (n mod 3)^(n mod 2).
%C A093718 Period 6: repeat [1, 1, 1, 0, 1, 2]. - _Joerg Arndt_, Jun 09 2013
%H A093718 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,1,-1,1).
%F A093718 a(n) = A010872(n)^A000035(n).
%F A093718 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 A093718 a(n) = (n + 3) mod (2 + n mod 2) - _Wesley Ivan Hurt_, Aug 16 2014
%F A093718 From _Wesley Ivan Hurt_, Jun 23 2016: (Start)
%F A093718 a(n) = cos(n*Pi/6) * (6*cos(n*Pi/6)-3*cos(n*Pi/2)-sqrt(3)*sin(n*Pi/2))/3.
%F A093718 a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5).
%F A093718 a(n) = a(n-6) for n>5. (End)
%F A093718 E.g.f.: cosh(x) - cosh(x/2)*sin(sqrt(3)*x/2)/sqrt(3) + cos(sqrt(3)*x/2)*sinh(x/2) + sinh(x). - _Stefano Spezia_, Jul 26 2024
%p A093718 A093718:=n->(n mod 3)^(n mod 2): seq(A093718(n), n=0..100); # _Wesley Ivan Hurt_, Aug 16 2014
%t A093718 Table[Mod[n + 3, 2 + Mod[n, 2]], {n, 0, 100}] (* _Wesley Ivan Hurt_, Aug 16 2014 *)
%t A093718 LinearRecurrence[{1,-1,1,-1,1},{1,1,1,0,1},120] (* _Harvey P. Dale_, Jan 17 2021 *)
%o A093718 (Magma) &cat [[1, 1, 1, 0, 1, 2]^^20]; // _Wesley Ivan Hurt_, Jun 23 2016
%Y A093718 Cf. A000035, A010872, A093719.
%K A093718 nonn,easy
%O A093718 0,6
%A A093718 _Reinhard Zumkeller_, Apr 12 2004