login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A232599 Alternating sum of cubes, i.e., Sum_{k=0..n} k^p*q^k for p=3, q=-1. 14
0, -1, 7, -20, 44, -81, 135, -208, 304, -425, 575, -756, 972, -1225, 1519, -1856, 2240, -2673, 3159, -3700, 4300, -4961, 5687, -6480, 7344, -8281, 9295, -10388, 11564, -12825, 14175, -15616, 17152, -18785, 20519 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
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) = ((-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).
Sequence in context: A143058 A298488 A175428 * A011934 A159222 A100206
KEYWORD
sign,easy
AUTHOR
Stanislav Sykora, Nov 26 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:21 EDT 2024. Contains 371794 sequences. (Running on oeis4.)