A078003 Expansion of (1-x)/(1-2*x+2*x^2-2*x^3).
1, 1, 0, 0, 2, 4, 4, 4, 8, 16, 24, 32, 48, 80, 128, 192, 288, 448, 704, 1088, 1664, 2560, 3968, 6144, 9472, 14592, 22528, 34816, 53760, 82944, 128000, 197632, 305152, 471040, 727040, 1122304, 1732608, 2674688, 4128768, 6373376, 9838592, 15187968, 23445504, 36192256
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,-2,2).
Crossrefs
Cf. A077943.
Programs
-
GAP
a:=[1,1,0];; for n in [4..50] do a[n]:=2*(a[n-1]-a[n-2]+a[n-3]); od; a; # G. C. Greubel, Jun 27 2019
-
Magma
R
:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1-x)/( 1-2*x+2*x^2-2*x^3) )); // G. C. Greubel, Jun 27 2019 -
Mathematica
LinearRecurrence[{2,-2,2}, {1,1,0}, 50] (* or *) CoefficientList[ Series[(1-x)/(1-2*x+2*x^2-2*x^3), {x,0,50}], x] (* G. C. Greubel, Jun 27 2019 *)
-
PARI
Vec((1-x)/(1-2*x+2*x^2-2*x^3)+O(x^50)) \\ Charles R Greathouse IV, Sep 26 2012
-
Sage
((1-x)/(1-2*x+2*x^2-2*x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Jun 27 2019