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”).
%I #27 Dec 14 2023 05:17:59
%S 1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,
%T -1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,
%U 0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1,0,0,-1,1
%N Expansion of (1-x^3)/(1-x^4).
%C Period 4: repeat [1, 0, 0, -1].
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,-1).
%F G.f.: (1+x+x^2)/(1+x+x^2+x^3).
%F a(n) = (-1)^floor(n/2)/2+(-1)^n/2.
%F a(n) = cos(Pi*n/2)/2 + sin(Pi*n/2)/2 + cos(Pi*n)/2.
%F a(n) = -a(n-1)-a(n-2)-a(n-3) for n>2 with a(0)=1, a(1)=a(2)=0. - _Jaume Oliver Lafont_, Dec 05 2008
%p seq(op([1, 0, 0, -1]), n=0..50); # _Wesley Ivan Hurt_, Jul 06 2016
%t CoefficientList[ Series[(1 - x^3)/(1 - x^4), {x, 0, 105}], x] (* _Robert G. Wilson v_, Jan 15 2005 *)
%o (Magma) &cat [[1, 0, 0, -1]^^30]; // _Wesley Ivan Hurt_, Jul 06 2016
%o (PARI) x='x+O('x^50); Vec((1 - x^3)/(1 - x^4)) \\ _G. C. Greubel_, Jun 02 2017
%K easy,sign
%O 0,1
%A _Paul Barry_, Jan 14 2005