login
a(n) = 7*2^n - 3.
4

%I #19 Sep 08 2022 08:45:41

%S 4,11,25,53,109,221,445,893,1789,3581,7165,14333,28669,57341,114685,

%T 229373,458749,917501,1835005,3670013,7340029,14680061,29360125,

%U 58720253,117440509,234881021,469762045,939524093,1879048189,3758096381

%N a(n) = 7*2^n - 3.

%H Vincenzo Librandi, <a href="/A156127/b156127.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 (3,-2).

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

%F G.f.: ( 4-x ) / ( (2*x-1)*(x-1) ). - _R. J. Mathar_, Oct 13 2011

%t LinearRecurrence[{3, -2}, {4, 11}, 40] (* _Vincenzo Librandi_, Mar 01 2012 *)

%o (Magma) I:=[4, 11]; [n le 2 select I[n] else 3*Self(n-1)-2*Self(n-2): n in [1..40]]; // _Vincenzo Librandi_, Mar 01 2012

%o (PARI) a(n)=7*2^n-3 \\ _Charles R Greathouse IV_, Oct 16 2015

%K nonn,easy

%O 0,1

%A _Vincenzo Librandi_, Feb 08 2009

%E Corrected by _R. J. Mathar_, Oct 13 2011