|
|
A078022
|
|
Expansion of (1-x)/(1-x+2*x^2+2*x^3).
|
|
1
|
|
|
1, 0, -2, -4, 0, 12, 20, -4, -68, -100, 44, 380, 492, -356, -2100, -2372, 2540, 11484, 11148, -16900, -62164, -50660, 107468, 333116, 219500, -661668, -1766900, -882564, 3974572, 9273500, 3089484, -23406660, -48132628, -7498276, 135580300, 246842108, -9321940, -774166756
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
G.f. = 1 - 2*x^2 - 4*X^3 + 12*X^5 + 20*X^6 - 4*X^7 - 68*X^8 - 100*X^9 + ... - Michael Somos, Jun 29 2019
|
|
MATHEMATICA
|
CoefficientList[Series[(1-x)/(1-x+2*x^2+2*x^3), {x, 0, 40}], x] (* or *) LinearRecurrence[{1, -2, -2}, {1, 0, -2}, 40] (* Harvey P. Dale, Mar 25 2018 *)
a[ n_] := LinearRecurrence[{1, -2, -2}, {1, 0, -2}, {n}][[1]]; (* Michael Somos, Jun 29 2019 *)
|
|
PROG
|
(PARI) my(x='x+O('x^40)); Vec((1-x)/(1-x+2*x^2+2*x^3)) \\ G. C. Greubel, Jun 29 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x)/(1-x+2*x^2+2*x^3) )); // G. C. Greubel, Jun 29 2019
(Sage) ((1-x)/(1-x+2*x^2+2*x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 29 2019
(GAP) a:=[1, 0, -2];; for n in [4..40] do a[n]:=a[n-1]-2*a[n-2]-2*a[n-3]; od; a; # G. C. Greubel, Jun 29 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|