%I #23 Oct 05 2018 07:58:39
%S 0,0,0,1,2,1,0,0,0,1,2,1,0,0,0,1,2,1,0,0,0,1,2,1,0,0,0,1,2,1,0,0,0,1,
%T 2,1,0,0,0,1,2,1,0,0,0,1,2,1,0,0,0,1,2,1,0,0,0,1,2,1,0,0,0,1,2,1,0,0,
%U 0,1,2,1,0,0,0,1,2,1,0,0,0,1,2,1
%N Period 6: repeat [0, 0, 0, 1, 2, 1].
%C Underlying A174257(n+1), n >= 0.
%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) = floor((n (mod 6))/3) + floor((n + 1 (mod 6))/5), n >= 0.
%F G.f.: x^3*(1 + x)^2/(1 - x^6) = -x^3*(1+x)/(x-1)/(1+x+x^2)/(1-x+x^2).
%F a(n) = (4 - 3*cos(n*Pi/3) - cos(2*n*Pi/3) - 3*sqrt(3)*sin(n*Pi/3) + sqrt(3)*sin(2*n*Pi/3))/6. - _Wesley Ivan Hurt_, Oct 04 2018
%t PadRight[{}, 102, {0, 0, 0, 1, 2, 1}] (* or *)
%t CoefficientList[Series[x^3*(1 + x)^2/(1 - x^6), {x, 0, 102}], x] (* _Michael De Vlieger_, Feb 25 2018 *)
%o (PARI) a(n) = my(v=[0, 0, 1, 2, 1]); v[if(n%6==0, 1, n%6)] \\ _Felix Fröhlich_, Feb 24 2018
%o (PARI) concat(vector(3), Vec(x^3*(1 + x)^2/(1 - x^6) + O(x^40))) \\ _Felix Fröhlich_, Feb 25 2018
%Y Cf. A174257, A300067.
%K nonn,easy
%O 0,5
%A _Wolfdieter Lang_, Feb 24 2018