%I #29 Dec 12 2023 09:15:54
%S 0,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,
%T 1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,
%U 1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0,0,1,1,1,1,0
%N Period 6: repeat [0, 1, 1, 1, 1, 0].
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,1,-1,1).
%F G.f.: -(x^2+1)*x/(x-1)/(x^2+x+1)/(x^2-x+1). - _R. J. Mathar_, Nov 14 2007
%F a(n) = 2/3-cos(Pi*n/3)/2+sqrt(3)*sin(Pi*n/3)/6 -cos(2*Pi*n/3)/6 +sqrt(3)*sin(2*Pi*n/3)/6. - _R. J. Mathar_, Oct 08 2011
%F a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) for n>4. - _Wesley Ivan Hurt_, Jun 19 2016
%F a(n+3) = A000358(n)(mod 2), for n>0. - _John M. Campbell_, Jul 08 2016
%p A131719:=n->[0, 1, 1, 1, 1, 0][(n mod 6)+1]: seq(A131719(n), n=0..100); # _Wesley Ivan Hurt_, Jun 19 2016
%t PadRight[{}, 200, {0, 1, 1, 1, 1, 0}] (* _Wesley Ivan Hurt_, Jun 19 2016 *)
%o (PARI) a(n)=[0,1,1,1,1,0][n%6+1] \\ _Charles R Greathouse IV_, Jun 02 2011
%o (Magma) &cat[[0, 1, 1, 1, 1, 0]^^20]; // _Wesley Ivan Hurt_, Jun 19 2016
%K nonn,easy,less
%O 0,1
%A _Paul Curtz_, Sep 15 2007