A131532 Period 6: repeat [0, 0, 0, 0, 1, 1].
0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (1,-1,1,-1,1).
Programs
-
Magma
&cat[[0, 0, 0, 0, 1, 1]^^20]; // Wesley Ivan Hurt, Jun 19 2016
-
Maple
A131532:=n->[0, 0, 0, 0, 1, 1][(n mod 6)+1]: seq(A131532(n), n=0..100); # Wesley Ivan Hurt, Jun 19 2016
-
Mathematica
PadRight[{}, 200, {0, 0, 0, 0, 1, 1}] (* Wesley Ivan Hurt, Jun 19 2016 *)
-
PARI
a(n)=n%6>3 \\ Jaume Oliver Lafont, Aug 28 2009
Formula
G.f.: -x^4/((x-1)*(x^2+x+1)*(x^2-x+1)). - R. J. Mathar, Nov 14 2007
From Wesley Ivan Hurt, Jun 19 2016: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) for n>4.
a(n) = sin(n*Pi/3)*(2*sin(n*Pi/3)-sqrt(3))/3. (End)
Extensions
Edited by N. J. A. Sloane, Sep 15 2007