A154687 Period 6: repeat [1, 4, 7, 8, 5, 2].
1, 4, 7, 8, 5, 2, 1, 4, 7, 8, 5, 2, 1, 4, 7, 8, 5, 2, 1, 4, 7, 8, 5, 2, 1, 4, 7, 8, 5, 2, 1, 4, 7, 8, 5, 2, 1, 4, 7, 8, 5, 2, 1, 4, 7, 8, 5, 2, 1, 4, 7, 8, 5, 2, 1, 4, 7, 8, 5, 2, 1, 4, 7, 8, 5, 2, 1, 4, 7, 8, 5, 2, 1, 4, 7, 8, 5, 2, 1, 4, 7, 8, 5, 2, 1, 4
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (1,0,-1,1).
Programs
-
Magma
&cat [[1, 4, 7, 8, 5, 2]^^20]; // Wesley Ivan Hurt, Jun 23 2016
-
Maple
A154687:=n->[1, 4, 7, 8, 5, 2][(n mod 6)+1]: seq(A154687(n), n=0..100); # Wesley Ivan Hurt, Jun 23 2016
-
Mathematica
PadRight[{}, 72, {1,4,7,8,5,2}] (* Harvey P. Dale, Nov 12 2011 *)
Formula
From Wesley Ivan Hurt, Jun 23 2016: (Start)
G.f.: (1+3*x+3*x^2+2*x^3) / (1-x+x^3-x^4).
a(n) = a(n-1) - a(n-3) + a(n-4) for n>3.
a(n) = (27 - cos(n*Pi) - 20*cos(n*Pi/3) + 4*sqrt(3)*sin(n*Pi/3))/6. (End)
Comments