login
A153110
Period 6: repeat [1, 5, 7, 2, 4, 8].
4
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,2
COMMENTS
Also A141425^5 mod 9. See A020806.
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
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 *)
PROG
(PARI) a(n)=[1, 2, 4, 5, 7, 8][n%6+1] \\ Charles R Greathouse IV, Jun 02 2011
(Magma) &cat[[1, 5, 7, 2, 4, 8]: n in [0..20]]; // Wesley Ivan Hurt, Jun 17 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Dec 18 2008
STATUS
approved