%I #34 Feb 04 2023 02:13:15
%S 1,-2,6,-10,14,-18,22,-26,30,-34,38,-42,46,-50,54,-58,62,-66,70,-74,
%T 78,-82,86,-90,94,-98,102,-106,110,-114,118,-122,126,-130,134,-138,
%U 142,-146,150,-154,158,-162,166,-170,174,-178,182,-186,190,-194,198,-202,206,-210,214,-218,222,-226,230,-234
%N Expansion of (1+3*x^2)/(1+x)^2.
%H Vincenzo Librandi, <a href="/A161718/b161718.txt">Table of n, a(n) for n = 0..10000</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (-2,-1).
%F From _R. J. Mathar_, Aug 27 2009: (Start)
%F a(n) = -2*a(n-1)-a(n-2), n>3.
%F G.f.: (1+3*x^2)/(1+x)^2.
%F a(n) = 4*(-1)^n*n+2*(-1)^(n+1) = (-1)^n*A016825(n-1), n>0. (End)
%F E.g.f.: 3 - 2*exp(-x)*(1 + 2*x). - _Stefano Spezia_, Feb 02 2023
%t CoefficientList[Series[(1+3*x^2)/(1+x)^2,{x,0,80}],x] (* or *) LinearRecurrence[ {-2,-1},{1,-2,6},80] (* _Harvey P. Dale_, Mar 19 2016 *)
%o (PARI) x='x+O('x^99); Vec((1+3*x^2)/(1+x)^2) \\ _Altug Alkan_, Apr 17 2018
%Y Cf. A016825, A111284 (unsigned version), A135929, A137276.
%K sign,easy
%O 0,2
%A Pr Mosbah Amlouk (Mosbah.Amlouk(AT)fsb.rnu.tn), Jun 17 2009
%E Spurious commas in sequence deleted by _N. J. A. Sloane_, Aug 02 2009
%E Offset corrected, extended by _R. J. Mathar_, Aug 27 2009
%E Edited by _Joerg Arndt_, Sep 04 2011