%I #18 Sep 08 2022 08:46:12
%S 1,1,0,-2,-2,0,2,2,0,-2,-2,0,2,2,0,-2,-2,0,2,2,0,-2,-2,0,2,2,0,-2,-2,
%T 0,2,2,0,-2,-2,0,2,2,0,-2,-2,0,2,2,0,-2,-2,0,2,2,0,-2,-2,0,2,2,0,-2,
%U -2,0,2,2,0,-2,-2,0,2,2,0,-2,-2,0,2,2,0,-2,-2,0
%N Expansion of (1 - x^3) / (1 - x + x^2) in powers of x.
%H G. C. Greubel, <a href="/A257076/b257076.txt">Table of n, a(n) for n = 0..2500</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (1, -1).
%F Euler transform of length 6 sequence [ 1, -1, -2, 0, 0, 1].
%F G.f.: (1 - x^2) * (1 - x^3)^2 / ((1 - x) * (1 - x^6)).
%F a(n) = -a(n+3) if n>1.
%F a(n) = A109265(n-1) if n>0.
%F Convolution inverse of A257075.
%F a(n) = A130772(n) for n>1. - _R. J. Mathar_, Apr 19 2015
%F a(n) = A184334(n+1) if n>1. - _Michael Somos_, Sep 01 2015
%e G.f. = 1 + x - 2*x^3 - 2*x^4 + 2*x^6 + 2*x^7 - 2*x^9 - 2*x^10 + 2*x^12 + ...
%t a[ n_] := SeriesCoefficient[ (1 - x^3) / (1 - x + x^2), {x, 0, n}];
%t Join[{1, 1},LinearRecurrence[{1, -1},{0, -2},76]] (* _Ray Chandler_, Aug 10 2015 *)
%o (PARI) {a(n) = n++; if( n<3, n>0, 2 * (n%3>0) * (-1)^(n\3))};
%o (PARI) {a(n) = if( n<0, 0, polcoeff( (1 - x^3) / (1 - x + x^2) + x * O(x^n), n))};
%o (Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 - x^3)/(1-x+x^2))); // _G. C. Greubel_, Aug 03 2018
%Y Cf. A109265, A130772, A184334, A257075.
%K sign,easy
%O 0,4
%A _Michael Somos_, Apr 15 2015