A173598 Period 6: repeat [1, 8, 7, 2, 4, 5].
1, 8, 7, 2, 4, 5, 1, 8, 7, 2, 4, 5, 1, 8, 7, 2, 4, 5, 1, 8, 7, 2, 4, 5, 1, 8, 7, 2, 4, 5, 1, 8, 7, 2, 4, 5, 1, 8, 7, 2, 4, 5, 1, 8, 7, 2, 4, 5, 1, 8, 7, 2, 4, 5, 1, 8, 7, 2, 4, 5, 1, 8, 7, 2, 4, 5, 1, 8, 7, 2, 4, 5, 1, 8, 7, 2, 4, 5, 1, 8, 7, 2, 4, 5, 1, 8
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,1).
Programs
-
Magma
&cat [[1, 8, 7, 2, 4, 5]^^20]; // Wesley Ivan Hurt, Jun 23 2016
-
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 *)
-
PARI
a(n)=[1,8,7,2,4,5][n%6+1] \\ Charles R Greathouse IV, Jun 02 2011
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)
Comments