OFFSET
1,2
COMMENTS
A001580 2^n+n^2 -> 1,3,8,17,32,57,100,177,320,593,1124,..
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (6,-14,16,-9,2).
FORMULA
From Colin Barker, Feb 26 2016: (Start)
a(n) = (n-2)*(2*n^2+n+3)/6+2^n.
a(n) = 6*a(n-1)-14*a(n-2)+16*a(n-3)-9*a(n-4)+2*a(n-5) for n>5.
G.f.: x*(1-2*x+2*x^2-3*x^3) / ((1-x)^4*(1-2*x)).
(End)
MATHEMATICA
f[n_]:=Sum[2^i+i^2, {i, 0, n}]; Table[f[n], {n, 0, 5!}]
Accumulate[Table[2^n+n^2, {n, 0, 50}]] (* or *) LinearRecurrence[{6, -14, 16, -9, 2}, {1, 4, 12, 29, 61}, 50] (* Harvey P. Dale, Sep 23 2019 *)
PROG
(PARI) Vec(x*(1-2*x+2*x^2-3*x^3)/((1-x)^4*(1-2*x)) + O(x^40)) \\ Colin Barker, Feb 26 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Mar 08 2010
STATUS
approved