login
A232602
a(n) = Sum_{k=0..n} k^p*q^k, where p=3, q=-2.
12
0, -2, 30, -186, 838, -3162, 10662, -33242, 97830, -275418, 748582, -1977306, 5100582, -12897242, 32060454, -78531546, 189903910, -454052826, 1074770982, -2521320410, 5867287590, -13554437082
OFFSET
0,2
LINKS
S. Sykora, Finite and Infinite Sums of the Power Series (k^p)(x^k), DOI 10.3247/SL1Math06.002, Section V.
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
Cf. A059841 (p=0,q=-1), A130472 (p=1,q=-1), A089594 (p=2,q=-1), A232599 (p=3,q=-1), A126646 (p=0,q=2), A036799 (p=1,q=2), A036800 (p=2,q=2), A036827 (p=3,q=2), A077925 (p=0,q=-2), A232600 (p=1,q=-2), A232601 (p=2,q=-2), A232603 (p=2,q=-1/2), A232604 (p=3,q=-1/2).
Sequence in context: A078838 A267851 A089288 * A154413 A007030 A157054
KEYWORD
sign,easy
AUTHOR
Stanislav Sykora, Nov 27 2013
STATUS
approved