OFFSET
0,2
LINKS
Stanislav Sykora, Table of n, a(n) for n = 0..1000
S. Sykora, Finite and Infinite Sums of the Power Series (k^p)(x^k), DOI 10.3247/SL1Math06.002, Section V.
Index entries for linear recurrences with constant coefficients, signature (-7,-16,-8,16,16).
FORMULA
a(n) = 2*(1 - (-2)^n*(1 +3*n -9*n^2 -9*n^3))/27.
G.f.: -2*x*(1-8*x+4*x^2) / ( (1-x)*(1+2*x)^4 ). - R. J. Mathar, Nov 23 2014
E.g.f.: (2/27)*(exp(x) - (1 +30*x -144*x^2 +72*x^3)*exp(-2*x)). - G. C. Greubel, Mar 31 2021
a(n) = - 7*a(n-1) - 16*a(n-2) - 8*a(n-3) + 16*a(n-4) + 16*a(n-5). - Wesley Ivan Hurt, Mar 31 2021
EXAMPLE
a(3) = 0^3*2^0 - 1^3*2^1 + 2^3*2^2 - 3^3*2^3 = -186.
MAPLE
A232602:= n-> 2*(1 -(-2)^n*(1 +3*n -9*n^2 -9*n^3))/27; seq(A232602(n), n=0..35); # G. C. Greubel, Mar 31 2021
MATHEMATICA
LinearRecurrence[{-7, -16, -8, 16, 16}, {0, -2, 30, -186, 838}, 40] (* G. C. Greubel, Mar 31 2021 *)
PROG
(PARI) a(n)=((-1)^n*2^(n+1)*(27*n^3+27*n^2-9*n-3)+6)/81;
(Magma) [2*(1 -(-2)^n*(1 +3*n -9*n^2 -9*n^3))/27: n in [0..35]]; // G. C. Greubel, Mar 31 2021
(Sage) [2*(1 -(-2)^n*(1 +3*n -9*n^2 -9*n^3))/27 for n in (0..35)] # G. C. Greubel, Mar 31 2021
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Stanislav Sykora, Nov 27 2013
STATUS
approved