login
a(n) = 2*a(n-1) + 2*a(n-2) - 3*a(n-3).
0

%I #23 Dec 27 2023 08:31:53

%S 2,5,12,28,65,150,346,797,1836,4228,9737,22422,51634,118901,273804,

%T 630508,1451921,3343446,7699210,17729549,40827180,94015828,216497369,

%U 498544854,1148036962,2643671525,6087782412,14018796988,32282144225,74338535190,171184967866

%N a(n) = 2*a(n-1) + 2*a(n-2) - 3*a(n-3).

%D R. K. Guy, personal communication.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (2,2,-3).

%F G.f.: ( 2+x-2*x^2 ) / ( (x-1)*(3*x^2+x-1) ). - _R. J. Mathar_, Feb 11 2016

%t LinearRecurrence[{2,2,-3},{2,5,12},50] (* _Harvey P. Dale_, Jan 19 2021 *)

%o (Magma) I:=[2, 5, 12]; [n le 3 select I[n] else 2*Self(n-1) + 2*Self(n-2) - 3*Self(n-3): n in [1..30]]; // _Wesley Ivan Hurt_, Dec 27 2021

%Y Cf. A018914.

%K nonn,easy

%O 0,1

%A _N. J. A. Sloane_