A131531 Period 6: repeat [0, 0, 1, 0, 0, -1].
0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0, 1, 0, 0, -1, 0, 0
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (0,0,-1).
Programs
-
Magma
&cat[[0, 0, 1, 0, 0, -1]^^20]; // Wesley Ivan Hurt, Jun 20 2016
-
Maple
A131531:=n->[0, 0, 1, 0, 0, -1][(n mod 6)+1]: seq(A131531(n), n=0..100); # Wesley Ivan Hurt, Jun 20 2016
-
Mathematica
PadRight[{}, 120, {0,0,1,0,0,-1}] (* Harvey P. Dale, Nov 11 2012 *)
-
PARI
a(n)=[0,0,1,0,0,-1][n%6+1] \\ Charles R Greathouse IV, Jun 01 2011
Formula
G.f.: x^3/(x+1)/(x^2-x+1). - R. J. Mathar, Nov 14 2007
a(n) = (-A057079(n+1) - (-1)^n)/3. - R. J. Mathar, Jun 13 2011
a(n) = -cos(Pi*(n-1)/3)/3 + sin(Pi*(n-1)/3)/sqrt(3) - (-1)^n/3. - R. J. Mathar, Oct 08 2011
a(n) = ( (-1)^n - (-1)^floor((n+2)/3) )/2. - Bruno Berselli, Jul 09 2013
a(n) + a(n-3) = 0 for n > 3. - Wesley Ivan Hurt, Jun 20 2016
Extensions
Edited by N. J. A. Sloane, Sep 15 2007
Comments