login
A078003
Expansion of (1-x)/(1-2*x+2*x^2-2*x^3).
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,5
FORMULA
a(n) = A077943(n) - A077943(n-1). - R. J. Mathar, Aug 04 2008
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 *)
PROG
(PARI) Vec((1-x)/(1-2*x+2*x^2-2*x^3)+O(x^50)) \\ Charles R Greathouse IV, Sep 26 2012
(Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1-x)/( 1-2*x+2*x^2-2*x^3) )); // G. C. Greubel, Jun 27 2019
(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
(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
CROSSREFS
Cf. A077943.
Sequence in context: A309690 A173531 A122788 * A081524 A299768 A021413
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved