OFFSET
0,2
COMMENTS
For x=1 this is A000124.
Equals row sums of triangle A144332. Left border of A144332 = A000124. - Gary W. Adamson, Sep 18 2008
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-8,4).
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
EXAMPLE
Sum of reciprocals = 1.469480896985753544533086291..
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 *)
PROG
(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
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Cino Hilliard, Nov 20 2003
STATUS
approved