login
A078005
Expansion of (1-x)/(1-2*x+2*x^2+2*x^3).
2
1, 1, 0, -4, -10, -12, 4, 52, 120, 128, -88, -672, -1424, -1328, 1536, 8576, 16736, 13248, -24128, -108224, -194688, -124672, 356480, 1351680, 2239744, 1063168, -5056512, -16718848, -25451008, -7351296, 69637120, 204878848, 285186048, 21340160, -937449472, -2487951360, -3143684096
OFFSET
0,4
FORMULA
a(n+3) = 2*a(n+2) - 2*a(n+1) - 2*a(n), where a(0)=1, a(1)=1, a(2)=0. - Sergei N. Gladkovskii, Aug 21 2012
MATHEMATICA
LinearRecurrence[{2, -2, -2}, {1, 1, 0}, 40] (* or *) CoefficientList[
Series[(1-x)/(1-2*x+2*x^2+2*x^3), {x, 0, 40}], x] (* G. C. Greubel, Jun 27 2019 *)
PROG
(PARI) my(x='x+O('x^40)); Vec((1-x)/(1-2*x+2*x^2+2*x^3)) \\ G. C. Greubel, Jun 27 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); 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, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 27 2019
(GAP) a:=[1, 1, 0];; for n in [4..40] do a[n]:=2*(a[n-1]-a[n-2]-a[n-3]); od; a; # G. C. Greubel, Jun 27 2019
CROSSREFS
Sequence in context: A182943 A310339 A090070 * A370859 A355275 A092428
KEYWORD
sign
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved