The sum of the cubes of consecutive numbers from 1 through n is the square of the sum of the numbers from 1 to n.
So the sum of the cubes of consecutive numbers from 1 through 4 is the square of the sum of the numbers 1 + 2 + 3 + 4 = 10 or 10^2 = 100.
For example, 1^3 + 2^3 + 3^3 + 4^3 = 1 + 8 + 27 + 64 = 100.
S(n) = 1^3 + ... + n^3 = [n(1 + n)/2]^2, I hope that helps!:-)