login
a(n) = ( 8*(2^n) - n^2 - 3*n - 6 )/2.
4

%I #33 Sep 08 2022 08:44:57

%S 1,3,8,20,47,105,226,474,977,1991,4028,8112,16291,32661,65414,130934,

%T 261989,524115,1048384,2096940,4194071,8388353,16776938,33554130,

%U 67108537,134217375,268435076,536870504,1073741387,2147483181

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

%C Partial sums of A000325, starting at n=1. - _Klaus Brockhaus_, Oct 13 2008

%H Vincenzo Librandi, <a href="/A048492/b048492.txt">Table of n, a(n) for n = 0..1000</a>

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

%F a(0) = 1; a(n) = a(n-1) + 2^(n+1) - (n+1) for n > 0. - _Klaus Brockhaus_, Oct 13 2008

%F From _Colin Barker_, Oct 27 2014: (Start)

%F a(n) = (-2+2^(2+n)-1/2*(1+n)*(2+n)).

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

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

%F (End)

%t lst={};s=0;Do[s+=2^n-n;AppendTo[lst, s], {n, 5!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Sep 30 2008 *)

%t Table[(8*2^n-n^2-3n-6)/2,{n,0,30}]

%t LinearRecurrence[{5,-9,7,-2},{1,3,8,20},40] (* _Harvey P. Dale_, Aug 28 2019 *)

%o (ARIBAS) a:=0; for n:=1 to 30 do a:=a+2**n-n; write(a, ","); end; # _Klaus Brockhaus_, Oct 13 2008

%o (Magma) [( 8*(2^n) -n^2 -3*n -6 )/2: n in [0..30]]; // _Vincenzo Librandi_, Sep 23 2011

%o (PARI) Vec((2*x^2-2*x+1) / ((x-1)^3*(2*x-1)) + O(x^100)) \\ _Colin Barker_, Oct 27 2014

%Y a(n)=T(0, n)+T(1, n-1)+...+T(n, 0), array T given by A048483.

%Y Cf. A000325 (2^n - n), A145070. - _Klaus Brockhaus_, Oct 13 2008

%K nonn,easy

%O 0,2

%A _Clark Kimberling_

%E Better description from _Frank Ellermann_, Mar 16 2002

%E Corrected by _T. D. Noe_, Nov 08 2006