login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A078032 Expansion of (1-x)/(1+x^2+x^3). 1
1, -1, -1, 0, 2, 1, -2, -3, 1, 5, 2, -6, -7, 4, 13, 3, -17, -16, 14, 33, 2, -47, -35, 45, 82, -10, -127, -72, 137, 199, -65, -336, -134, 401, 470, -267, -871, -203, 1138, 1074, -935, -2212, -139, 3147, 2351, -3008, -5498, 657, 8506, 4841, -9163, -13347, 4322, 22510, 9025, -26832, -31535, 17807, 58367 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
FORMULA
a(0)=1, a(1)=-1, a(2)=-1, a(n) = -a(n-2) - a(n-3). - Harvey P. Dale, Sep 14 2012
a(n) = (-1)^n * A097333(-2-n) for all n in Z. - Michael Somos, Nov 02 2021
EXAMPLE
G.f. = 1 - x - x^2 + 2*x^4 + x^5 - 2*x^6 - 3*x^7 + x^8 + 5*x^9 + ... - Michael Somos, Nov 02 2021
MAPLE
seq(coeff(series((1-x)/(1+x^2+x^3), x, n+1), x, n), n = 0..60); # G. C. Greubel, Aug 05 2019
MATHEMATICA
CoefficientList[Series[(1-x)/(1+x^2+x^3), {x, 0, 60}], x] (* or *) LinearRecurrence[{0, -1, -1}, {1, -1, -1}, 60] (* Harvey P. Dale, Sep 14 2012 *)
a[ n_] := If[n >= 0, SeriesCoefficient[(1 - x)/(1 + x^2 + x^3), {x, 0, n}], SeriesCoefficient[(x^2 - 1)/(1 + x + x^3), {x, 0, 1 - n}]]; (* Michael Somos, Nov 02 2021 *)
PROG
(PARI) my(x='x+O('x^60)); Vec((1-x)/(1+x^2+x^3)) \\ G. C. Greubel, Aug 05 2019
(PARI) {a(n) = if(n>=0, polcoeff( (1 - x)/(1 + x^2 + x^3) + x*O(x^n), n), polcoeff( (x^2 - 1)/(1 + x + x^3) + x*O(x^(1-n)), 1-n))}; /* Michael Somos, Nov 02 2021 */
(Magma) R<x>:=PowerSeriesRing(Integers(), 60); Coefficients(R!( (1-x)/(1+x^2+x^3) )); // G. C. Greubel, Aug 05 2019
(Sage) ((1-x)/(1+x^2+x^3)).series(x, 60).coefficients(x, sparse=False) # G. C. Greubel, Aug 05 2019
(GAP) a:=[1, -1, -1];; for n in [4..60] do a[n]:=-a[n-2]-a[n-3]; od; a; # G. C. Greubel, Aug 05 2019
CROSSREFS
Cf. A097333.
Sequence in context: A101391 A327632 A117704 * A162453 A008313 A334550
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 9 18:53 EDT 2024. Contains 372354 sequences. (Running on oeis4.)