# Summation of n-squared, cubed, etc. [duplicate]

How do you in general derive a formula for summation of n-squared, n-cubed, etc...? Clear explanation with reference would be great.

## marked as duplicate by Aryabhata, J. M. is a poor mathematician, Namaste, Cameron Buie, azimutApr 19 '13 at 5:26

• – Alex Ravsky Aug 18 '17 at 10:24

In general, if you want to derive a formula for the sum of $1^k+\cdots+n^k,$ let $$f(x)=\sum_{j=0}^{k+1}a_jx^j$$ and solve $$f(x)-f(x-1)=x^k$$ for the coefficients $a_j$. The polynomial that results will have the property that $f(n)=1^k+\cdots+ n^k$ for all positive integers $n$.

The Wikipedia article on Faulhaber's Formula will be very useful.

Equivalents of formulas for sums of squares and sums of cubes were already known in classical times. Formulas for the next few powers were developed by Islamic mathematicians. The full story was known by the time of Bernoulli, in the early $18$-th century.

The motivation was usually to develop a formula for quadrature (integration) of integer powers of $x$.

Start with: $$\sum_{0 \le k \le n} z^k = \frac{1 - z^{n + 1}}{1 - z}$$ If you do: $$\left( z \frac{d}{d z} \right)^m \sum_{0 \le k \le n} z^k = \sum_{0 \le k \le n} k^m z^k$$ Compute the derivative, evaluate at $z = 1$ (you will need to apply l'Hôpital for the derivative at the right hand side as a limit) and you have the sum of the first $m$-th powers.

Another way is to apply the Euler-Maclaurin formula to the sum of $n^m$, which gives: $$\sum_{0 \le k \le n} n^m = \frac{1}{m + 1} \left( \sum_{0 \le k \le m} \binom{m + 1}{k} \, B_k n^{m + 1 - k} \right)$$ Here the $B_k$ are the Bernoulli numbers.

Let $\displaystyle S(n;m) = \sum_{k=1}^n k^m$. Now consider $$(k+1)^{m+1} - k^{m+1} = \sum_{l=0}^m \dbinom{m+1}{l} k^l$$ Now telescopic summation gives $$(n+1)^{m+1} - 1 = \sum_{l=0}^m \dbinom{m+1}{l} \left(\sum_{k=1}^nk^l \right) = \sum_{l=0}^m \dbinom{m+1}{l} S(n;l)$$ $(1)$ Take $m=0$ and get $S(n;0)$.

$(2)$ Take $m=1$, use $S(n;0)$ and get $S(n;1)$.

$(3)$ Take $m=2$, use $S(n;0),S(n;1)$ and get $S(n;2)$.

$(4)$ Take $m=3$, use $S(n;0),S(n;1),S(n;2)$ and get $S(n;3)$.

$(5)$ And so on...