## Sum of Consecutive Cubes

Calculate the sum of first n cubes or the sum of consecutive cubic numbers from n_{1}

^{3 }to n

_{2}

^{3 }. A cube number (or a cube) is a number you can write as a product of three equal factors of natural numbers. The sum of consecutive cubic numbers from n

_{1}

^{3 }to n

_{2}

^{3 }is equal to:

n

_{1}

^{3 }+ (n

_{1}+ 1)

^{3}+ ... + n

_{2}

^{3}

Sum of consecutive cubes: |

for example we input these value 5 it means we wants the sum of 1

^{3},2

^{3},3

^{3},4

^{3}, and 5

^{3}

= 1x1x1 + 2x2x2 + 3x3x3 + 4x4x4 + 5x5x5

= 1 + 8 + 27 + 64 + 125

= 225

now calculate the same example using following formula:

Sum of consecutive squares = (n

^{2}(n + 1)

^{2}/4 )

= 5x5 (5 + 1)(5 + 1)/4

= 25 (6x6)/4

= 25x36/4

= 25x9

= 225