A132708 Period 6: repeat [4, 2, 1, -4, -2, -1].
4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1, 4, 2, 1, -4, -2, -1
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,-1).
Crossrefs
Cf. A070366 (5^n mod 9).
Programs
-
Magma
&cat [[4,2,1,-4,-2,-1]^^30]; // Wesley Ivan Hurt, Jun 28 2016
-
Maple
A132708:= n -> [4, 2, 1, -4, -2, -1][(n mod 6)+1]: seq(A132708(n), n=0..100); # Wesley Ivan Hurt, Jun 28 2016
-
Mathematica
PadRight[{}, 120, {4, 2, 1, -4, -2, -1}] (* Harvey P. Dale, Nov 21 2015 *) Differences[PowerMod[5, Range[0, 90], 9]] (* Alonso del Arte, Jun 04 2016 *)
Formula
G.f.: (x^2 + 2*x + 4)/(x^3 + 1). - Chai Wah Wu, Jun 04 2016
From Wesley Ivan Hurt, Jun 28 2016: (Start)
a(n) + a(n-3) = 0 for n>2.
a(n) = a(n-6) for n>5.
a(n) = cos(n*Pi) + 3*cos(n*Pi/3) + sqrt(3)*sin(n*Pi/3). (End)
Extensions
Name changed by Wesley Ivan Hurt, Jun 28 2016
Comments