%I #21 May 07 2024 03:29:23
%S 1,6,-4,16,-24,56,-104,216,-424,856,-1704,3416,-6824,13656,-27304,
%T 54616,-109224,218456,-436904,873816,-1747624,3495256,-6990504,
%U 13981016,-27962024,55924056,-111848104,223696216,-447392424,894784856,-1789569704,3579139416,-7158278824
%N a(n) = 8/3 - 5*(-2)^n/3.
%H Vincenzo Librandi, <a href="/A083581/b083581.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (-1,2).
%F a(n) = (8-5(-2)^n)/3.
%F G.f.: (1+7x)/((1-x)(1+2x)).
%F E.g.f.: (8*exp(x)-5*exp(-2*x))/3.
%t Table[(8 - 5 (-2)^n)/3, {n, 0, 40}] (* or *) CoefficientList[Series[(1 + 7 x)/((1 - x) (1 + 2 x)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Aug 23 2014 *)
%o (Magma) [(8-5*(-2)^n)/3: n in [0..40]]; // _Vincenzo Librandi_, Aug 23 2014
%o (PARI) a(n)=8/3-5*(-2)^n/3 \\ _Charles R Greathouse IV_, Oct 07 2015
%Y Cf. A083582.
%K easy,sign
%O 0,2
%A _Paul Barry_, May 01 2003