%I #30 Sep 25 2024 23:12:39
%S 0,2,7,12,21,44,91,180,357,716,1435,2868,5733,11468,22939,45876,91749,
%T 183500,367003,734004,1468005,2936012,5872027,11744052,23488101,
%U 46976204,93952411,187904820,375809637,751619276,1503238555,3006477108
%N a(n) = 2*a(n-1) - a(n-2) + 2*a(n-3), with a(0) = 2, a(1) = 2.
%H Vincenzo Librandi, <a href="/A135541/b135541.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,-1,2).
%F From _R. J. Mathar_, Feb 23 2008: (Start)
%F O.g.f.: -7/(5*(2x-1)) - (4x+7)/(5*(x^2+1)).
%F a(n) = (7*2^n - (-1)^floor(n/2)*A010712(n+1))/5. (End)
%F E.g.f.: (1/5)*(7*cosh(2*x) + 7*sinh(2*x) - 7*cos(x) - 4*sin(x)). - _G. C. Greubel_, Oct 18 2016
%t LinearRecurrence[{2,-1,2},{0,2,7},40] (* _Vincenzo Librandi_, Jun 17 2012 *)
%o (Magma) I:=[0, 2, 7]; [n le 3 select I[n] else 2*Self(n-1)-Self(n-2)+2*Self(n-3): n in [1..40]]; // _Vincenzo Librandi_, Jun 17 2012
%Y Cf. A007909, A007910, A010712, A016029, A134658.
%K nonn,easy
%O 0,2
%A _Paul Curtz_, Feb 22 2008
%E More terms from _R. J. Mathar_, Feb 23 2008