login
A078021
Expansion of (1-x)/(1-x+2*x^2+x^3).
1
1, 0, -2, -3, 1, 9, 10, -9, -38, -30, 55, 153, 73, -288, -587, -84, 1378, 2133, -539, -6183, -7238, 5667, 26326, 22230, -36089, -106875, -56927, 192912, 413641, 84744, -935450, -1518579, 267577, 4240185, 5223610, -3524337, -18211742, -16386678, 23561143, 74546241, 43810633, -128842992
OFFSET
0,3
FORMULA
a(n) = A077978(n) - A077978(n-1). - G. C. Greubel, Jun 29 2019
a(n) = a(n-1)-2*a(n-2)-a(n-3). - Wesley Ivan Hurt, Apr 26 2021
MATHEMATICA
LinearRecurrence[{1, -2, -1}, {1, 0, -2}, 50] (* or *) CoefficientList[ Series[(1-x)/(1-x+2*x^2+x^3), {x, 0, 50}], x] (* G. C. Greubel, Jun 29 2019 *)
PROG
(PARI) my(x='x+O('x^50)); Vec((1-x)/(1-x+2*x^2+x^3)) \\ G. C. Greubel, Jun 29 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1-x)/(1-x+2*x^2+x^3) )); // G. C. Greubel, Jun 29 2019
(Sage) ((1-x)/(1-x+2*x^2+x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Jun 29 2019
(GAP) a:=[1, 0, -2];; for n in [4..50] do a[n]:=a[n-1]-2*a[n-2]-a[n-3]; od; a; # G. C. Greubel, Jun 29 2019
CROSSREFS
Cf. A077978.
Sequence in context: A200016 A147557 A117025 * A300838 A106342 A247563
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved