A110270 a(n) = (n mod 2)*(n mod 3).
0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0, 0, 0, 2, 0, 1, 0
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,1).
Programs
-
Magma
&cat [[0,1,0,0,0,2]^^20]; // Bruno Berselli, Mar 22 2016
-
Maple
A110270:=n->(n mod 2)*(n mod 3): seq(A110270(n), n=0..100); # Wesley Ivan Hurt, Aug 16 2014
-
Mathematica
Table[Mod[n,2]Mod[n,3],{n,0,110}] (* or *) PadRight[{},110,{0,1,0,0,0,2}] (* Harvey P. Dale, Oct 01 2013 *)
-
PARI
a(n) = (n % 2) * (n % 3); \\ Michel Marcus, Aug 17 2014
-
PARI
concat(0, Vec(x*(1+2*x^4)/((1-x)*(1+x)*(1-x+x^2)*(1+x+x^2)) + O(x^50))) \\ Colin Barker, Mar 22 2016
Formula
a(n) = n mod (2 + n mod 2). - Wesley Ivan Hurt, Aug 16 2014
a(n) = a(n-6) for n>5. G.f.: x*(1+2*x^4) / ((1-x)*(1+x)*(1-x+x^2)*(1+x+x^2)). - Colin Barker, Mar 22 2016
a(n) = ( 6*sin(n*Pi/3) - sqrt(3) )*( sin(n*Pi/3) + sin(2*n*Pi/3) )/6. - Wesley Ivan Hurt, Jun 23 2016
Comments