%I #13 Sep 08 2022 08:45:08
%S 1,1,0,-4,-10,-12,4,52,120,128,-88,-672,-1424,-1328,1536,8576,16736,
%T 13248,-24128,-108224,-194688,-124672,356480,1351680,2239744,1063168,
%U -5056512,-16718848,-25451008,-7351296,69637120,204878848,285186048,21340160,-937449472,-2487951360,-3143684096
%N Expansion of (1-x)/(1-2*x+2*x^2+2*x^3).
%H G. C. Greubel, <a href="/A078005/b078005.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,-2,-2).
%F 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
%t LinearRecurrence[{2,-2,-2}, {1,1,0}, 40] (* or *) CoefficientList[
%t Series[(1-x)/(1-2*x+2*x^2+2*x^3), {x,0,40}], x] (* _G. C. Greubel_, Jun 27 2019 *)
%o (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
%o (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
%o (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
%o (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
%K sign
%O 0,4
%A _N. J. A. Sloane_, Nov 17 2002
|