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”).

A257076
Expansion of (1 - x^3) / (1 - x + x^2) in powers of x.
5
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, 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, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0, 2, 2, 0, -2, -2, 0
OFFSET
0,4
FORMULA
Euler transform of length 6 sequence [ 1, -1, -2, 0, 0, 1].
G.f.: (1 - x^2) * (1 - x^3)^2 / ((1 - x) * (1 - x^6)).
a(n) = -a(n+3) if n>1.
a(n) = A109265(n-1) if n>0.
Convolution inverse of A257075.
a(n) = A130772(n) for n>1. - R. J. Mathar, Apr 19 2015
a(n) = A184334(n+1) if n>1. - Michael Somos, Sep 01 2015
EXAMPLE
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 + ...
MATHEMATICA
a[ n_] := SeriesCoefficient[ (1 - x^3) / (1 - x + x^2), {x, 0, n}];
Join[{1, 1}, LinearRecurrence[{1, -1}, {0, -2}, 76]] (* Ray Chandler, Aug 10 2015 *)
PROG
(PARI) {a(n) = n++; if( n<3, n>0, 2 * (n%3>0) * (-1)^(n\3))};
(PARI) {a(n) = if( n<0, 0, polcoeff( (1 - x^3) / (1 - x + x^2) + x * O(x^n), n))};
(Magma) m:=50; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 - x^3)/(1-x+x^2))); // G. C. Greubel, Aug 03 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Michael Somos, Apr 15 2015
STATUS
approved