A300067 Period 6: repeat [0, 0, 0, 1, 2, 2].
0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 1, 2, 2
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,1).
Crossrefs
Cf. A300068.
Programs
-
Mathematica
PadRight[{}, 102, {0, 0, 0, 1, 2, 2}] (* or *) CoefficientList[Series[x^3*(1 + 2 x + 2 x^2)/(1 - x^6), {x, 0, 102}], x] (* Michael De Vlieger, Feb 25 2018 *)
-
PARI
a(n) = my(v=[0, 0, 1, 2, 2]); v[if(n%6==0, 1, n%6)] \\ Felix Fröhlich, Feb 24 2018
-
PARI
concat(vector(3), Vec(x^3*(1 + 2*x + 2*x^2)/(1 - x^6) + O(x^40))) \\ Felix Fröhlich, Feb 25 2018
Formula
a(n) = floor((n (mod 6))/3) + floor((n (mod 6))/4), n >= 0.
G.f.: x^3*(1 + 2*x + 2*x^2)/(1 - x^6).
a(n) = (5 - 2*cos(n*Pi/3) - 2*cos(2*n*Pi/3) - cos(n*Pi) - 4*sqrt(3)*sin(n*Pi/3))/6. - Wesley Ivan Hurt, Oct 04 2018
Comments