login
a(n) = 4^n + 4.
2

%I #28 Sep 12 2023 18:01:14

%S 5,8,20,68,260,1028,4100,16388,65540,262148,1048580,4194308,16777220,

%T 67108868,268435460,1073741828,4294967300,17179869188,68719476740,

%U 274877906948,1099511627780,4398046511108,17592186044420,70368744177668,281474976710660,1125899906842628

%N a(n) = 4^n + 4.

%H Vincenzo Librandi, <a href="/A178675/b178675.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 (5,-4).

%F a(n) = 4*(a(n-1) - 3) with n > 0, a(0)=5.

%F G.f.: ( 5-17*x ) / ( (1-4*x)*(1-x) ). - _R. J. Mathar_, Jan 05 2011

%F a(n) = 5*a(n-1) - 4*a(n-2). - _Vincenzo Librandi_, Jun 18 2013

%F E.g.f.: exp(4*x) + 4*exp(x). - _G. C. Greubel_, Jan 27 2019

%t Table[4^n +4, {n, 0, 40}] (* or *) CoefficientList[Series[(5-17x)/((4x - 1)(x-1)), {x, 0, 30}], x] (* _Vincenzo Librandi_, Jun 18 2013 *)

%t LinearRecurrence[{5,-4},{5,8},30] (* _Harvey P. Dale_, Sep 12 2023 *)

%o (Magma)[4^n+4: n in [0..35]];

%o (Magma) I:=[5, 8]; [n le 2 select I[n] else 5*Self(n-1)-4*Self(n-2): n in [1..30]]; // _Vincenzo Librandi_, Jun 18 2013

%o (PARI) vector(40, n, n--; 4^n+4) \\ _G. C. Greubel_, Jan 27 2019

%o (Sage) [4^n+4 for n in range(40)] # _G. C. Greubel_, Jan 27 2019

%o (GAP) List([0..30], n -> 4^n + 4); # _G. C. Greubel_, Jan 27 2019

%Y Cf. A052548, A178674, A178676, A178681.

%K nonn,easy

%O 0,1

%A _Vincenzo Librandi_, Dec 25 2010