A131719 Period 6: repeat [0, 1, 1, 1, 1, 0].
0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (1,-1,1,-1,1).
Programs
-
Magma
&cat[[0, 1, 1, 1, 1, 0]^^20]; // Wesley Ivan Hurt, Jun 19 2016
-
Maple
A131719:=n->[0, 1, 1, 1, 1, 0][(n mod 6)+1]: seq(A131719(n), n=0..100); # Wesley Ivan Hurt, Jun 19 2016
-
Mathematica
PadRight[{}, 200, {0, 1, 1, 1, 1, 0}] (* Wesley Ivan Hurt, Jun 19 2016 *)
-
PARI
a(n)=[0,1,1,1,1,0][n%6+1] \\ Charles R Greathouse IV, Jun 02 2011
Formula
G.f.: -(x^2+1)*x/(x-1)/(x^2+x+1)/(x^2-x+1). - R. J. Mathar, Nov 14 2007
a(n) = 2/3-cos(Pi*n/3)/2+sqrt(3)*sin(Pi*n/3)/6 -cos(2*Pi*n/3)/6 +sqrt(3)*sin(2*Pi*n/3)/6. - R. J. Mathar, Oct 08 2011
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) for n>4. - Wesley Ivan Hurt, Jun 19 2016
a(n+3) = A000358(n)(mod 2), for n>0. - John M. Campbell, Jul 08 2016