cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A145070 Partial sums of A006127, starting at n=1.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Examples

			a(2) = a(1) + 2^2 + 2 = 3 + 4 + 2 = 9; a(3) = a(2) + 2^3 + 3 = 9 + 8 + 3 = 20.
		

Crossrefs

Cf. A006127 (2^n + n), A000325 (2^n - n), A048492 (partial sums of A000325, starting at n=1).

Programs

  • ARIBAS
    a:=0; for n:=1 to 30 do a:=a+2**n+n; write(a, ","); end;
    
  • Maple
    A145070:=n->(-4+2^(2+n)+n+n^2)/2: seq(A145070(n), n=1..50); # Wesley Ivan Hurt, Jan 22 2017
  • 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 *)
  • PARI
    Vec(x*(2*x^2-6*x+3) / ((x-1)^3*(2*x-1)) + O(x^100)) \\ Colin Barker, Oct 27 2014

Formula

a(1) = 3; a(n) = a(n-1) + 2^n + n for n > 1.
From Colin Barker, Oct 27 2014: (Start)
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)

Extensions

Edited by Klaus Brockhaus, Oct 14 2008