|
|
A145070
|
|
Partial sums of A006127, starting at n=1.
|
|
2
|
|
|
3, 9, 20, 40, 77, 147, 282, 546, 1067, 2101, 4160, 8268, 16473, 32871, 65654, 131206, 262295, 524457, 1048764, 2097360, 4194533, 8388859, 16777490, 33554730, 67109187, 134218077, 268435832, 536871316, 1073742257, 2147484111
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
a(1) = 3; a(n) = a(n-1) + 2^n + n for n > 1.
a(n) = (-4+2^(2+n)+n+n^2)/2.
a(n) = 5*a(n-1)-9*a(n-2)+7*a(n-3)-2*a(n-4).
G.f.: x*(2*x^2-6*x+3) / ((x-1)^3*(2*x-1)).
(End)
|
|
EXAMPLE
|
a(2) = a(1) + 2^2 + 2 = 3 + 4 + 2 = 9; a(3) = a(2) + 2^3 + 3 = 9 + 8 + 3 = 20.
|
|
MAPLE
|
|
|
MATHEMATICA
|
lst={}; s=0; Do[s+=2^n+n; AppendTo[lst, s], {n, 5!}]; lst
Accumulate[Table[2^n+n, {n, 50}]] (* or *) LinearRecurrence[{5, -9, 7, -2}, {3, 9, 20, 40}, 50] (* Harvey P. Dale, Aug 22 2020 *)
|
|
PROG
|
(ARIBAS) a:=0; for n:=1 to 30 do a:=a+2**n+n; write(a, ", "); end;
(PARI) Vec(x*(2*x^2-6*x+3) / ((x-1)^3*(2*x-1)) + O(x^100)) \\ Colin Barker, Oct 27 2014
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|