A093719 a(n) = (n mod 2)^(n mod 3).
1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1
Offset: 0
Links
- Antti Karttunen, Table of n, a(n) for n = 0..65537
- Index entries for characteristic functions
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,1).
Programs
-
GAP
List([0..120],n->(n mod 2)^(n mod 3)); # Muniru A Asiru, Dec 19 2018
-
Magma
[(n mod 2)^(n mod 3): n in [0..100]]; // Wesley Ivan Hurt, Oct 13 2014
-
Maple
A093719:=n->(n mod 2)^(n mod 3): seq(A093719(n), n=0..40); # Wesley Ivan Hurt, Oct 13 2014
-
Mathematica
PadRight[{},120,{1,1,0,1,0,1}] (* Harvey P. Dale, Jun 26 2021 *)
-
PARI
A093719(n) = ((n%2)^(n%3)); \\ Antti Karttunen, Dec 19 2018
Formula
G.f.: -(x^5 + x^3 + x + 1)/(x^6 - 1). - Colin Barker, Apr 01 2013
E.g.f.: (2*cos(sqrt(3)*x/2)*cosh(x/2) + cosh(x))/3 + sinh(x). - Stefano Spezia, Jul 26 2024
Comments