OFFSET
0,3
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 (-3,-2,2,3,1).
FORMULA
a(n) = ((-1)^n*(4*n^3+6*n^2-1) +1)/8.
G.f.: (-x)*(1-4*x+x^2) / ( (1-x)*(1+x)^4 ). - R. J. Mathar, Nov 23 2014
E.g.f.: (exp(x) - (1 +10*x -18*x^2 +4*x^3)*exp(-x))/8. - G. C. Greubel, Mar 31 2021
a(n) = - 3*a(n-1) - 2*a(n-2) + 2*a(n-3) + 3*a(n-4) + a(n-5). - Wesley Ivan Hurt, Mar 31 2021
EXAMPLE
a(3) = 0^3 - 1^3 + 2^3 - 3^3 = -20.
MAPLE
A232599:= n-> (1 -(-1)^n*(1 -6*n^2 -4*n^3))/8; seq(A232599(n), n=0..30); # G. C. Greubel, Mar 31 2021
MATHEMATICA
Accumulate[Times@@@Partition[Riffle[Range[0, 40]^3, {1, -1}, {2, -1, 2}], 2]] (* Harvey P. Dale, Jul 22 2016 *)
PROG
(PARI) S3M1(n)=((-1)^n*(4*n^3+6*n^2-1)+1)/8;
v = vector(10001); for(k=1, #v, v[k]=S3M1(k-1))
(Magma) [(1 - (-1)^n*(1 -6*n^2 -4*n^3))/8: n in [0..30]]; // G. C. Greubel, Mar 31 2021
(Sage) [(1 - (-1)^n*(1 -6*n^2 -4*n^3))/8 for n in (0..30)] # G. C. Greubel, Mar 31 2021
CROSSREFS
Cf. A000578 (cubes), A011934 (absolute values), A059841 (p=0,q=-1), A130472 (p=1,q=-1), A089594 (p=2,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), A232602 (p=3,q=-2), A232603 (p=2,q=-1/2), A232604 (p=3,q=-1/2).
KEYWORD
sign,easy
AUTHOR
Stanislav Sykora, Nov 26 2013
STATUS
approved