%I #16 Aug 22 2020 18:52:53
%S 3,9,20,40,77,147,282,546,1067,2101,4160,8268,16473,32871,65654,
%T 131206,262295,524457,1048764,2097360,4194533,8388859,16777490,
%U 33554730,67109187,134218077,268435832,536871316,1073742257,2147484111
%N Partial sums of A006127, starting at n=1.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (5,-9,7,-2).
%F a(1) = 3; a(n) = a(n-1) + 2^n + n for n > 1.
%F From _Colin Barker_, Oct 27 2014: (Start)
%F a(n) = (-4+2^(2+n)+n+n^2)/2.
%F a(n) = 5*a(n-1)-9*a(n-2)+7*a(n-3)-2*a(n-4).
%F G.f.: x*(2*x^2-6*x+3) / ((x-1)^3*(2*x-1)).
%F (End)
%e a(2) = a(1) + 2^2 + 2 = 3 + 4 + 2 = 9; a(3) = a(2) + 2^3 + 3 = 9 + 8 + 3 = 20.
%p A145070:=n->(-4+2^(2+n)+n+n^2)/2: seq(A145070(n), n=1..50); # _Wesley Ivan Hurt_, Jan 22 2017
%t lst={};s=0;Do[s+=2^n+n;AppendTo[lst,s],{n,5!}];lst
%t Accumulate[Table[2^n+n,{n,50}]] (* or *) LinearRecurrence[{5,-9,7,-2},{3,9,20,40},50] (* _Harvey P. Dale_, Aug 22 2020 *)
%o (ARIBAS) a:=0; for n:=1 to 30 do a:=a+2**n+n; write(a, ","); end;
%o (PARI) Vec(x*(2*x^2-6*x+3) / ((x-1)^3*(2*x-1)) + O(x^100)) \\ _Colin Barker_, Oct 27 2014
%Y Cf. A006127 (2^n + n), A000325 (2^n - n), A048492 (partial sums of A000325, starting at n=1).
%K nonn,easy
%O 1,1
%A _Vladimir Joseph Stephan Orlovsky_, Sep 30 2008
%E Edited by _Klaus Brockhaus_, Oct 14 2008