OFFSET
1,2
COMMENTS
A024012 2^n-n^2 -> 1,1,0,-1,0,7,28,79,192,431,924,1927,3952,..
LINKS
Index entries for linear recurrences with constant coefficients, signature (6,-14,16,-9,2).
FORMULA
a(n) = (-1+2^n-n/6+n^2/2-n^3/3). G.f.: -x*(x^3+4*x^2-4*x+1) / ((x-1)^4*(2*x-1)). - Colin Barker, Oct 27 2014
MATHEMATICA
f[n_]:=Sum[2^i-i^2, {i, 0, n}]; Table[f[n], {n, 0, 5!}]
PROG
(PARI) Vec(-x*(x^3+4*x^2-4*x+1)/((x-1)^4*(2*x-1)) + O(x^100)) \\ Colin Barker, Oct 27 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Mar 08 2010
STATUS
approved