A153110 Period 6: repeat [1, 5, 7, 2, 4, 8].
1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (-1,0,1,1).
Programs
-
Magma
&cat[[1, 5, 7, 2, 4, 8]: n in [0..20]]; // Wesley Ivan Hurt, Jun 17 2016
-
Maple
A153110:=n->(9-cos(n*Pi)-4*sqrt(3)*cos((1-4*n)*Pi/6))/2: seq(A153110(n), n=0..100); # Wesley Ivan Hurt, Jun 17 2016
-
Mathematica
PadLeft[{},90,{1,5,7,2,4,8}] (* Harvey P. Dale, Sep 10 2011 *)
-
PARI
a(n)=[1,2,4,5,7,8][n%6+1] \\ Charles R Greathouse IV, Jun 02 2011
Formula
From R. J. Mathar, Mar 08 2011: (Start)
a(n) = - a(n-1) + a(n-3) + a(n-4) for n>3.
G.f.: (2*x+1)^3 / ( (1-x)*(1+x)*(1+x+x^2) ). (End)
a(n) = (9-cos(n*Pi)-4*sqrt(3)*cos((1-4*n)*Pi/6))/2. - Wesley Ivan Hurt, Jun 17 2016
Comments