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

%I #20 Aug 29 2024 21:13:36

%S 1,5,16,41,94,203,424,869,1762,3551,7132,14297,28630,57299,114640,

%T 229325,458698,917447,1834948,3669953,7339966,14679995,29360056,

%U 58720181,117440434,234880943,469761964,939524009,1879048102,3758096291

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

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

%F G.f.: (1 + x + x^2)/((1-x)^2*(1-2*x)).

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

%F a(n) = 4a(n-1) - 5a(n-2) + 2a(n-3).

%t s=1;lst={s};Do[s+=(s+=n)+n++;AppendTo[lst, s], {n, 1, 5!, 1}];lst (* _Vladimir Joseph Stephan Orlovsky_, Nov 15 2008 *)

%t Table[7*2^n-3n-6,{n,0,30}] (* or *) LinearRecurrence[{4,-5,2},{1,5,16},30] (* _Harvey P. Dale_, Nov 15 2011 *)

%Y Cf. A079583, A097809.

%K easy,nonn

%O 0,2

%A _Paul Barry_, Aug 25 2004