OFFSET
0,2
LINKS
Iain Fox, Table of n, a(n) for n = 0..3321
Index entries for linear recurrences with constant coefficients, signature (5,-9,7,-2).
FORMULA
G.f.: (x^3-4*x^2+1) / ((x-1)^3*(2*x-1)). - Colin Barker, May 09 2013
E.g.f.: exp(x) * (exp(x) + x*(3 + x)). - Iain Fox, Aug 08 2018
MATHEMATICA
Table[n^2 + 2*n + 2^n, {n, 0, 50}] (* T. D. Noe, Dec 14 2012 *)
PROG
(Maxima) makelist(n^2+2*n+2^n, n, 0, 20); /* Martin Ettl, Dec 15 2012 */
(PARI) a(n)=n^2+2*n+2^n \\ Charles R Greathouse IV, Oct 07 2015
(PARI) first(n) = Vec((1 - 4*x^2 + x^3)/((1 - x)^3 * (1 - 2*x)) + O(x^n)) \\ Iain Fox, Aug 08 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Dario Piazzalunga, Dec 14 2012
STATUS
approved