%I #26 Sep 08 2022 08:45:28
%S 1,0,0,-2,-4,-8,-12,-16,-16,-8,16,64,144,256,384,480,448,128,-704,
%T -2304,-4864,-8320,-12032,-14336,-12032,0,28672,81408,162816,268288,
%U 373760,421888,307200,-133120,-1110016,-2834432,-5402624,-8585216,-11501568,-12197888
%N Expansion of (1-2*x)/(1-2*x+2*x^3).
%C Diagonal sums of number array A124394.
%H Alois P. Heinz, <a href="/A124395/b124395.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,0,-2).
%F a(n) = Sum_{k=0..floor(n/2)} Sum{j=0..k+1} C(k+1,j)*C(n-j+1,2k+1)*(-2)^j.
%F a(n) = term (2,2) in the 3 X 3 matrix [2,1,0; 0,0,1; -2,0,0]^n. - _Alois P. Heinz_, Sep 10 2008
%F a(n) = 2*a(n-1) - 2*a(n-3); a(0)=1, a(1)=0, a(2)=0. - _Harvey P. Dale_, Dec 21 2013
%F a(n) = A077940(n) - 2*A077940(n-1). - _R. J. Mathar_, Jan 25 2016
%p a:= n-> (Matrix([[2, 1, 0], [0, 0, 1], [-2, 0, 0]])^n)[2, 2]: seq (a(n), n=0..35); # _Alois P. Heinz_, Sep 10 2008
%t CoefficientList[Series[(1-2x)/(1-2x+2x^3),{x,0,50}],x] (* or *) LinearRecurrence[{2,0,-2},{1,0,0},50] (* _Harvey P. Dale_, Dec 21 2013 *)
%o (PARI) my(x='x+O('x^50)); Vec((1-2*x)/(1-2*x+2*x^3)) \\ _G. C. Greubel_, Dec 25 2019
%o (Magma) I:=[1,0,0]; [n le 3 select I[n] else 2*Self(n-1) - 2*Self(n-3): n in [1..50]]; // _G. C. Greubel_, Dec 25 2019
%o (Sage)
%o def A124395_list(prec):
%o P.<x> = PowerSeriesRing(ZZ, prec)
%o return P( (1-2*x)/(1-2*x+2*x^3) ).list()
%o A124395_list(50) # _G. C. Greubel_, Dec 25 2019
%o (GAP) a:=[1,0,0];; for n in [3..50] do a[n]:=2*a[n-1]-2*a[n-3]; od; a; # _G. C. Greubel_, Dec 25 2019
%Y Cf. A077940.
%K easy,sign
%O 0,4
%A _Paul Barry_, Oct 30 2006