Sum of Cubes of Consecutive Positive Integers

Calculate \(N_1^3 + (N_1+1)^3 + \cdots + N_2^3\) for any positive integers \(N_1 < N_2\).

Understanding the Sum of Cubes

For consecutive positive integers from \(N_1\) to \(N_2\), the sum of cubes is given by:

\[ \sum_{k=N_1}^{N_2} k^3 = N_1^3 + (N_1+1)^3 + \cdots + N_2^3 \]

There is also a closed-form formula for the sum of cubes from 1 to n:

\[ \sum_{k=1}^{n} k^3 = \left(\frac{n(n+1)}{2}\right)^2 \]

Therefore, the sum from \(N_1\) to \(N_2\) can be computed as:

\[ \sum_{k=N_1}^{N_2} k^3 = \left(\frac{N_2(N_2+1)}{2}\right)^2 - \left(\frac{(N_1-1)N_1}{2}\right)^2 \]

Sum of Cubes Calculator

Enter two positive integers with \(N_1 < N_2\)


Enter positive integers with \(N_1 < N_2\).
Sum of cubes from \(N_1\) to \(N_2\) =
--

Related Resources