|
|
A077983
|
|
Expansion of 1/(1 + 2*x - 2*x^2 + x^3).
|
|
2
|
|
|
1, -2, 6, -17, 48, -136, 385, -1090, 3086, -8737, 24736, -70032, 198273, -561346, 1589270, -4499505, 12738896, -36066072, 102109441, -289089922, 818464798, -2317218881, 6560457280, -18573817120, 52585767681, -148879626882, 421504606246, -1193354233937, 3378597307248
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = -2*a(n-1) + 2*a(n-2) - a(n-3) with a(0) = 1, a(1) = -2, a(2) = 6. - Taras Goy, Aug 04 2017
|
|
MATHEMATICA
|
LinearRecurrence[{-2, 2, -1}, {1, -2, 6}, 30] (* or *) CoefficientList[ Series[1/(1+2*x-2*x^2+x^3), {x, 0, 30}], x] (* G. C. Greubel, Jun 25 2019 *)
|
|
PROG
|
(PARI) my(x='x+O('x^30)); Vec(1/(1+2*x-2*x^2+x^3)) \\ G. C. Greubel, Jun 25 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( 1/(1+2*x-2*x^2+x^3) )); // G. C. Greubel, Jun 25 2019
(Sage) (1/(1+2*x-2*x^2+x^3)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jun 25 2019
(GAP) a:=[1, -2, 6];; for n in [4..30] do a[n]:=-2*a[n-1]+2*a[n-2]-a[n-3]; od; a; # G. C. Greubel, Jun 25 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|