%I #38 Mar 31 2024 15:07:09
%S 1,1,2,2,3,3,1,1,2,2,3,3,1,1,2,2,3,3,1,1,2,2,3,3,1,1,2,2,3,3,1,1,2,2,
%T 3,3,1,1,2,2,3,3,1,1,2,2,3,3,1,1,2,2,3,3,1,1,2,2,3,3,1,1,2,2,3,3,1,1,
%U 2,2,3,3,1,1,2,2,3,3,1,1,2,2,3,3,1,1,2,2,3,3,1,1,2,2,3,3,1,1,2,2,3,3,1,1,2
%N Period 6: repeat [1, 1, 2, 2, 3, 3].
%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.: -(3*x^4+2*x^2+1)/(x-1)/(x^2+x+1)/(x^2-x+1). a(n) = A131555(n)+1. - _R. J. Mathar_, Nov 14 2007
%F From _Wesley Ivan Hurt_, Jun 17 2016: (Start)
%F a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) for n>4.
%F a(n) = (12-2*sqrt(3)*cos((1-4*n)*Pi/6)-6*sin((1+2*n)*Pi/6))/6. (End)
%F a(n) = floor(n/2) - 3*floor(n/6) + 1. - _Ridouane Oudra_, Sep 09 2023
%p A105899:=n->(12-2*sqrt(3)*cos((1-4*n)*Pi/6)-6*sin((1+2*n)*Pi/6))/6: seq(A105899(n), n=0..100); # _Wesley Ivan Hurt_, Jun 17 2016
%t Flatten[Table[{1, 1, 2, 2, 3, 3}, {20}]] (* _Wesley Ivan Hurt_, Jun 17 2016 *)
%t PadRight[{},120,{1,1,2,2,3,3}] (* _Harvey P. Dale_, May 09 2022 *)
%o (PARI) a(n)=1+n%6\2 \\ _Jaume Oliver Lafont_, Aug 30 2009
%o (Magma) &cat[[1, 1, 2, 2, 3, 3]: n in [0..20]]; // _Wesley Ivan Hurt_, Jun 17 2016
%Y Cf. A131555.
%Y Cf. A178308 Decimal expansion of (111+sqrt(25277))/158. [_Klaus Brockhaus_, May 24 2010]
%K nonn,easy,less
%O 0,3
%A _Paul Curtz_, Aug 27 2007
%E Edited by _N. J. A. Sloane_, Sep 15 2007
%E More terms from _Klaus Brockhaus_, May 24 2010