A133513 Period 6: repeat [0, 1, -3, 0, -1, 3].
0, 1, -3, 0, -1, 3, 0, 1, -3, 0, -1, 3, 0, 1, -3, 0, -1, 3, 0, 1, -3, 0, -1, 3, 0, 1, -3, 0, -1, 3, 0, 1, -3, 0, -1, 3, 0, 1, -3, 0, -1, 3, 0, 1, -3, 0, -1, 3, 0, 1, -3, 0, -1, 3, 0, 1, -3, 0, -1, 3, 0, 1, -3, 0, -1, 3, 0, 1, -3, 0, -1, 3, 0, 1, -3, 0, -1, 3
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,-1).
Programs
-
Magma
&cat [[0, 1, -3, 0, -1, 3]^^20]; // Wesley Ivan Hurt, Jun 21 2016
-
Maple
A133513:=n->[0, 1, -3, 0, -1, 3][(n mod 6)+1]: seq(A133513(n), n=0..100); # Wesley Ivan Hurt, Jun 21 2016
-
Mathematica
PadRight[{}, 100, {0, 1, -3, 0, -1, 3}] (* Wesley Ivan Hurt, Jun 21 2016 *)
-
PARI
a(n)=[0,1,-3,0,-1,3][n%6+1] \\ Charles R Greathouse IV, Jun 02 2011
Formula
From Wesley Ivan Hurt, Jun 21 2016: (Start)
G.f.: x*(1-3*x)/(1+x^3).
a(n) + a(n-3) = 0 for n>2.
a(n) = 2 * sin(n*Pi/3) * (4*sin(2*n*Pi/3) - sqrt(3))/3. (End)