|
|
A077986
|
|
Expansion of 1/(1 + 2*x - x^2 + x^3).
|
|
3
|
|
|
1, -2, 5, -13, 33, -84, 214, -545, 1388, -3535, 9003, -22929, 58396, -148724, 378773, -964666, 2456829, -6257097, 15935689, -40585304, 103363394, -263247781, 670444260, -1707499695, 4348691431, -11075326817, 28206844760, -71837707768, 182957587113, -465959726754
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = -2*a(n-1) + a(n-2) - a(n-3), with a(0)=1, a(1)=-2, a(2)=5. - Harvey P. Dale, Feb 14 2014
|
|
MAPLE
|
m:=30; S:=series(1/(1+2*x-x^2+x^3), x, m+1): seq(coeff(S, x, j), j=0..m); # G. C. Greubel, Feb 26 2020
|
|
MATHEMATICA
|
CoefficientList[Series[1/(1+2x-x^2+x^3), {x, 0, 30}], x] (* or *) LinearRecurrence[ {-2, 1, -1}, {1, -2, 5}, 30] (* Harvey P. Dale, Feb 14 2014 *)
b[n_]:= b[n]= If[n<3, n, 2*b[n-1] +b[n-2] +b[n-3]]; Table[(-1)^n*b[n+1], {n, 0, 30}] (* Rigoberto Florez, Jan 23 2020 *)
|
|
PROG
|
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( 1/(1+2*x-x^2+x^3) )); // G. C. Greubel, Jun 25 2019
(Sage)
P.<x> = PowerSeriesRing(ZZ, prec)
return ( 1/(1+2*x-x^2+x^3) ).list()
(GAP) a:=[1, -2, 5];; for n in [4..30] do a[n]:=-2*a[n-1]+a[n-2]-a[n-3]; od; a; # G. C. Greubel, Jun 25 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|