A088578 a(n) = n*x^n + (n-1)*x^(n-1) + . . . + x + 1 for x=2.
1, 3, 11, 35, 99, 259, 643, 1539, 3587, 8195, 18435, 40963, 90115, 196611, 425987, 917507, 1966083, 4194307, 8912899, 18874371, 39845891, 83886083, 176160771, 369098755, 771751939, 1610612739, 3355443203, 6979321859, 14495514627, 30064771075, 62277025795
Offset: 0
Examples
Sum of reciprocals = 1.469480896985753544533086291..
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (5,-8,4).
Programs
-
Magma
I:=[1,3,11]; [n le 3 select I[n] else 5*Self(n-1)-8*Self(n-2)+4*Self(n-3): n in [1..35]]; // Vincenzo Librandi, Jun 14 2015
-
Mathematica
LinearRecurrence[{5,-8,4},{1,3,11},40] (* Harvey P. Dale, Dec 22 2013 *) Table[(n - 1) 2^(n + 1) + 3, {n, 0, 30}] (* Vincenzo Librandi, Jun 14 2015 *)
-
PARI
trajpolypn(n1,k) = { s=0; for(x1=1,n1, y1 = polypn2(k,x1); print1(y1","); s+=1.0/y1; ); print(); print(s) } polypn2(n,p) = { x=n; y=1; for(m=1,p, y=y+m*x^m; ); return(y) }
-
PARI
Vec((1-2*x+4*x^2)/((1-x)*(1-2*x)^2) + O(x^50)) \\ Colin Barker, Jun 13 2015
Formula
a(n) = (n-1) * 2^(n+1) + 3.
a(n) = 5*a(n-1) - 8*a(n-2) + 4*a(n-3). - Colin Barker, Apr 02 2012
G.f.: (1-2*x+4*x^2)/((1-x)*(1-2*x)^2). - Colin Barker, Apr 02 2012
Comments