login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Period 6: repeat [0, 1, -1, 1, -1, 0].
2

%I #25 Dec 12 2023 09:15:58

%S 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,

%T 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,

%U -1,0,0,1,-1,1,-1,0,0,1,-1,1,-1,0,0,1,-1,1,-1,0

%N Period 6: repeat [0, 1, -1, 1, -1, 0].

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,-1,-1,-1).

%F a(n) = 1/6*cos(1/3*Pi*n)+1/6*3^(1/2)*sin(1/3*Pi*n)+1/2*cos(2/3*Pi*n)+1/6*3^(1/2)*sin(2/3*Pi*n)+2/3*(-1)^(1+n). - _R. J. Mathar_, Nov 15 2007

%F G.f.: x*(x^2+1) / ((x+1)*(x^2-x+1)*(x^2+x+1)). [Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009]

%F a(n) + a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5) = 0 for n>4. - _Wesley Ivan Hurt_, Jun 20 2016

%p A131720:=n->[0, 1, -1, 1, -1, 0][(n mod 6)+1]: seq(A131720(n), n=0..100); # _Wesley Ivan Hurt_, Jun 20 2016

%t PadRight[{}, 100, {0,1,-1,1,-1,0}] (* _Harvey P. Dale_, Aug 20 2015 *)

%o (PARI) a(n)=[0,1,-1,1,-1,0][n%6+1] \\ _Charles R Greathouse IV_, Jun 02 2011

%o (Magma) &cat [[0, 1, -1, 1, -1, 0]^^20]; // _Wesley Ivan Hurt_, Jun 20 2016

%K sign,easy,less

%O 0,1

%A _Paul Curtz_, Sep 15 2007