OFFSET
0,2
COMMENTS
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,1).
FORMULA
a(n) = A166138(n) mod 9.
a(2n+1) + a(2n+2) = 9.
G.f.: (1+8*x+7*x^2+2*x^3+4*x^4+5*x^5) / ((1-x)*(1+x)*(1+x+x^2)*(x^2-x+1)). - R. J. Mathar, Mar 08 2011
From Wesley Ivan Hurt, Jun 23 2016: (Start)
a(n) = a(n-6) for n>5.
a(n) = (9 - cos(n*Pi) - 6*cos(2*n*Pi/3) + 2*sqrt(3)*sin(n*Pi/3))/2. (End)
MAPLE
A173598:=n->[1, 8, 7, 2, 4, 5][(n mod 6)+1]: seq(A173598(n), n=0..100); # Wesley Ivan Hurt, Jun 23 2016
MATHEMATICA
PadRight[{}, 100, {1, 8, 7, 2, 4, 5}] (* Wesley Ivan Hurt, Jun 23 2016 *)
PROG
(PARI) a(n)=[1, 8, 7, 2, 4, 5][n%6+1] \\ Charles R Greathouse IV, Jun 02 2011
(Magma) &cat [[1, 8, 7, 2, 4, 5]^^20]; // Wesley Ivan Hurt, Jun 23 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Nov 23 2010
STATUS
approved