# Knowing the formula to the sum of the N integers a) what is the sum of the first N consecutive square integers, Sigma_(k=1)^N k^2 = 1^2+2^2+ cdots + (N-1)^2+N^2? b) Sum of the first N consecutive cube integers Sigma_(k=1)^N k^3?

May 31, 2016

For ${S}_{k} \left(n\right) = {\sum}_{i = 0}^{n} {i}^{k}$
${S}_{1} \left(n\right) = \frac{n \left(n + 1\right)}{2}$
${S}_{2} \left(n\right) = \frac{1}{6} n \left(1 + n\right) \left(1 + 2 n\right)$
${S}_{3} \left(n\right) = \frac{{\left(n + 1\right)}^{4} - \left(n + 1\right) - 6 {S}_{2} \left(n\right) - 4 {S}_{1} \left(n\right)}{4}$

#### Explanation:

We have

${\sum}_{i = 0}^{n} {i}^{3} = {\sum}_{i = 0}^{n} {\left(i + 1\right)}^{3} - {\left(n + 1\right)}^{3}$
${\sum}_{i = 0}^{n} {i}^{3} = {\sum}_{i = 0}^{n} {i}^{3} + 3 {\sum}_{i = 0}^{n} {i}^{2} + 3 {\sum}_{i = 0}^{n} i + {\sum}_{i = 0}^{n} 1 - {\left(n + 1\right)}^{3}$
$0 = 3 {\sum}_{i = 0}^{n} {i}^{2} + 3 {\sum}_{i = 0}^{n} i + {\sum}_{i = 0}^{n} 1 - {\left(n + 1\right)}^{3}$

solving for ${\sum}_{i = 0}^{n} {i}^{2}$

${\sum}_{i = 0}^{n} {i}^{2} = {\left(n + 1\right)}^{3} / 3 - \frac{n + 1}{3} - {\sum}_{i = 0}^{n} i$
but ${\sum}_{i = 0}^{n} i = \frac{\left(n + 1\right) n}{2}$ so
${\sum}_{i = 0}^{n} {i}^{2} = {\left(n + 1\right)}^{3} / 3 - \frac{n + 1}{3} - \frac{\left(n + 1\right) n}{2}$

${\sum}_{i = 0}^{n} {i}^{2} = \frac{1}{6} n \left(1 + n\right) \left(1 + 2 n\right)$

Using the same procedure for ${\sum}_{i = 0}^{n} {i}^{3}$

${\sum}_{i = 0}^{n} {i}^{4} = {\sum}_{i = 0}^{n} {\left(i + 1\right)}^{4} - {\left(n + 1\right)}^{4}$
${\sum}_{i = 0}^{n} {i}^{4} = {\sum}_{i = 0}^{n} {i}^{4} + 4 {\sum}_{i = 0}^{n} {i}^{3} + 6 {\sum}_{i = 0}^{n} {i}^{2} + 4 {\sum}_{i = 0}^{n} i + {\sum}_{i = 0}^{n} 1 - {\left(n + 1\right)}^{4}$

$0 = 4 {\sum}_{i = 0}^{n} {i}^{3} + 6 {\sum}_{i = 0}^{n} {i}^{2} + 4 {\sum}_{i = 0}^{n} i + {\sum}_{i = 0}^{n} 1 - {\left(n + 1\right)}^{4}$
$0 = 4 {S}_{3} \left(n\right) + 6 {S}_{2} \left(n\right) + 4 {S}_{1} \left(n\right) + \left(n + 1\right) - {\left(n + 1\right)}^{4}$

Solving for ${S}_{3} \left(n\right)$

${S}_{3} \left(n\right) = \frac{{\left(n + 1\right)}^{4} - \left(n + 1\right) - 6 {S}_{2} \left(n\right) - 4 {S}_{1} \left(n\right)}{4}$

Here ${S}_{k} \left(n\right) = {\sum}_{i = 0}^{n} {i}^{k}$