login
A078002
Expansion of (1-x)/(1-2*x+x^2+2*x^3).
1
1, 1, 1, -1, -5, -11, -15, -9, 19, 77, 153, 191, 75, -347, -1151, -2105, -2365, -323, 5929, 16911, 28539, 28309, -5743, -96873, -244621, -380883, -323399, 223327, 1531819, 3487109, 4995745, 3440743, -5088477, -23609187, -49011383, -64236625, -32243493, 97772405, 356261553, 679237687
OFFSET
0,5
MATHEMATICA
LinearRecurrence[{2, -1, -2}, {1, 1, 1}, 40] (* or *) CoefficientList[ Series[(1-x)/(1-2*x+x^2+2*x^3), {x, 0, 40}], x] (* G. C. Greubel, Jun 27 2019 *)
PROG
(PARI) my(x='x+O('x^40)); Vec((1-x)/(1-2*x+x^2+2*x^3)) \\ G. C. Greubel, Jun 27 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x)/( 1-2*x+x^2+2*x^3) )); // G. C. Greubel, Jun 27 2019
(Sage) ((1-x)/(1-2*x+x^2+2*x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 27 2019
(GAP) a:=[1, 1, 1];; for n in [4..40] do a[n]:=2*a[n-1]-a[n-2]-2*a[n-3]; od; a; # G. C. Greubel, Jun 27 2019
CROSSREFS
Sequence in context: A103011 A137002 A091718 * A171418 A213444 A314002
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved