%I #86 May 26 2022 02:18:19
%S 1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,
%T 0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,
%U 1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1
%N Period 6: repeat [1, 1, 1, 0, 0, 0].
%C For periodic sequences having a period of 2*k and composed of k ones followed by k zeros we have a(n) = floor(((n+k) mod 2*k)/k). Sequences of this form are A000035(n+1) (k=1), A133872(n) (k=2), this sequence (k=3), A131078(n) (k=4), and A112713(n-1) (k=5). - _Gary Detlefs_, May 17 2011
%H <a href="/index/Ch#Cheby">Index entries for sequences related to Chebyshev polynomials.</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,-1,1).
%F G.f.: (1+x+x^2)/(1-x^6) = 1/((1-x)*(1+x)*(1-x+x^2)).
%F a(n) = a(n-6) for n>=6, a(0)=a(1)=a(2)=1, a(3)=a(4)=a(5)=0.
%F a(n) = ((-1)^floor((5*n + 2)/3) + 1)/2 = ( (-1)^floor(n/3) + 1 )/2. [Simplified by _Bruno Berselli_, Jul 09 2013]
%F a(n) = Sum_{k=0..floor(n/2)} U(n-2k, 1/2). - _Paul Barry_, Nov 15 2003
%F From _Paul Barry_, Mar 14 2004: (Start)
%F Partial sums of expansion of 1/(1+x^3), see A131531.
%F a(n) = 2*sin(Pi*n/3 + Pi/6)/3 + cos(Pi*n)/6 + 1/2. (End)
%F a(n) = floor(((n+3) mod 6)/3).
%F a(n) = floor((5*n-1)/3) mod 2. - _Gary Detlefs_, May 17 2011
%F a(n) = 1/2 + cos(Pi*n/3)/3 + sin(Pi*n/3)/sqrt(3) + (-1)^n/6. - _R. J. Mathar_, Oct 08 2011
%F a(n) = floor(((n+2)^2)/3) mod 2. - _Wesley Ivan Hurt_, Jun 29 2013
%F a(n) = A079979(n) + A079979(n-1) + A079979(n-2). - _R. J. Mathar_, Jul 10 2015
%F a(n) = a(n-1) - a(n-3) + a(n-4) for n > 3. - _Wesley Ivan Hurt_, Jul 05 2016
%F a(n) = 2*floor(n/6) - floor(n/3) + 1. - _Ridouane Oudra_, Dec 14 2021
%p seq(op([1, 1, 1, 0, 0, 0]), n=0..40); # _Wesley Ivan Hurt_, Jul 05 2016
%t CoefficientList[Series[(1 + x + x^2)/(1 - x^6), {x, 0, 50}], x]
%t Flatten[Table[{1,1,1,0,0,0},{20}]] (* _Harvey P. Dale_, Jul 17 2011 *)
%o (PARI) a(n)=n%6<3 \\ _Jaume Oliver Lafont_, Mar 17 2009
%o (Magma) &cat [[1, 1, 1, 0, 0, 0]^^30]; // _Wesley Ivan Hurt_, Jul 05 2016
%o (Python)
%o def A088911(n): return int(n % 6 < 3) # _Chai Wah Wu_, May 25 2022
%Y Cf. A000035, A010701, A079979, A133872, A131078, A112713.
%K nonn,easy
%O 0,1
%A Mario Catalani (mario.catalani(AT)unito.it), Oct 22 2003