A105899 Period 6: repeat [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, 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, 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, 2, 3, 3, 1, 1, 2
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (1,-1,1,-1,1).
Crossrefs
Cf. A131555.
Cf. A178308 Decimal expansion of (111+sqrt(25277))/158. [Klaus Brockhaus, May 24 2010]
Programs
-
Magma
&cat[[1, 1, 2, 2, 3, 3]: n in [0..20]]; // Wesley Ivan Hurt, Jun 17 2016
-
Maple
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
-
Mathematica
Flatten[Table[{1, 1, 2, 2, 3, 3}, {20}]] (* Wesley Ivan Hurt, Jun 17 2016 *) PadRight[{},120,{1,1,2,2,3,3}] (* Harvey P. Dale, May 09 2022 *)
-
PARI
a(n)=1+n%6\2 \\ Jaume Oliver Lafont, Aug 30 2009
Formula
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
From Wesley Ivan Hurt, Jun 17 2016: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) for n>4.
a(n) = (12-2*sqrt(3)*cos((1-4*n)*Pi/6)-6*sin((1+2*n)*Pi/6))/6. (End)
a(n) = floor(n/2) - 3*floor(n/6) + 1. - Ridouane Oudra, Sep 09 2023
Extensions
Edited by N. J. A. Sloane, Sep 15 2007
More terms from Klaus Brockhaus, May 24 2010