Faulhaber's formula

In mathematics, Faulhaber's formula, named after the early 17th century mathematician Johann Faulhaber, expresses the sum of the p-th powers of the first n positive integers $$\sum_{k=1}^n k^p = 1^p + 2^p + 3^p + \cdots + n^p$$ as a polynomial in n. In modern notation, Faulhaber's formula is $$ \sum_{k=1}^n k^{p} = \frac{1}{p+1} \sum_{r=0}^p \binom{p+1}{r} B_r n^{p-r+1} .$$ Here, $\binom{p+1}{r}$ is the binomial coefficient "p + 1 choose r", and the Bj are the Bernoulli numbers with the convention that $B_1 = +\frac12$.

The result: Faulhaber's formula
Faulhaber's formula concerns expressing the sum of the p-th powers of the first n positive integers $$\sum_{k=1}^n k^p = 1^p + 2^p + 3^p + \cdots + n^p$$ as a (p + 1)th-degree polynomial function of n.

The first few examples are well known. For p = 0, we have $$\sum_{k=1}^n k^0 = \sum_{k=1}^n 1 = n .$$ For p = 1, we have the triangular numbers $$\sum_{k=1}^n k^1 = \sum_{k=1}^n k = \frac{n(n+1)}{2} = \frac12(n^2 + n) .$$ For p = 2, we have the square pyramidal numbers $$\sum_{k=1}^n k^2 = \frac{n(n+1)(2n+1)}{6} = \frac13(n^3 + \tfrac32 n^2 + \tfrac12n) .$$

The coefficients of Faulhaber's formula in its general form involve the Bernoulli numbers Bj. The Bernoulli numbers begin $$ \begin{align} B_0 &= 1 & B_1 &= \tfrac12 & B_2 &= \tfrac16 & B_3 &= 0 \\ B_4 &= -\tfrac{1}{30} & B_5 &= 0 & B_6 &= \tfrac{1}{42} & B_7 &= 0 , \end{align} $$ where here we use the convention that $B_1 = +\frac12$. The Bernoulli numbers have various definitions (see Bernoulli number), such as that they are the coefficients of the exponential generating function $$ \frac{t}{1 - \mathrm{e}^{-t}} = \frac{t}{2} \left( \operatorname{coth} \frac{t}{2} +1 \right) = \sum_{k=0}^\infty B_k \frac{t^k}{k!}. $$

Then Faulhaber's formula is that $$ \sum_{k=1}^n k^{p} = \frac{1}{p+1} \sum_{k=0}^p \binom{p+1}{k} B_k n^{p-k+1} .$$ Here, the Bj are the Bernoulli numbers as above, and $$\binom{p+1}{k} = \frac{(p+1)!}{(p+1-k)!\,k!} = \frac{(p+1)p(p-1) \cdots (p-k+3)(p-k+2)}{k(k-1)(k-2)\cdots2\cdot 1}$$ is the binomial coefficient "p + 1 choose k".

Examples
So, for example, one has for $p = 4$, $$\begin{align} 1^4 + 2^4 + 3^4 + \cdots + n^4 &= \frac{1}{5} \sum_{j=0}^4 {5 \choose j} B_j n^{5-j}\\ &= \frac{1}{5} \left(B_0 n^5+5B_1n^4+10B_2n^3+10B_3n^2+5B_4n\right)\\ &= \frac{1}{5} \left(n^5 + \tfrac{5}{2}n^4+ \tfrac{5}{3}n^3- \tfrac{1}{6}n \right) .\end{align}$$

The first seven examples of Faulhaber's formula are $$ \begin{align} \sum_{k=1}^n k^0 &=	\frac{1}{1} \, \big(n \big)	\\ \sum_{k=1}^n k^1 &=	\frac{1}{2} \, \big(n^2 + \tfrac{2}{2} n \big)	\\ \sum_{k=1}^n k^2 &=	\frac{1}{3} \, \big(n^3 + \tfrac{3}{2} n^2 + \tfrac{ 3}{6} n \big)	\\ \sum_{k=1}^n k^3 &=	\frac{1}{4} \, \big(n^4 + \tfrac{4}{2} n^3 + \tfrac{ 6}{6} n^2 + 0n \big)	\\ \sum_{k=1}^n k^4 &=	\frac{1}{5} \, \big(n^5 + \tfrac{5}{2} n^4 + \tfrac{10}{6} n^3 + 0n^2 - \tfrac{ 5}{30} n \big)	\\ \sum_{k=1}^n k^5 &=	\frac{1}{6} \, \big(n^6 + \tfrac{6}{2} n^5 + \tfrac{15}{6} n^4 + 0n^3 - \tfrac{15}{30} n^2 + 0n \big)	\\ \sum_{k=1}^n k^6 &=	\frac{1}{7} \, \big(n^7 + \tfrac{7}{2} n^6 + \tfrac{21}{6} n^5 + 0n^4 - \tfrac{35}{30} n^3 + 0n^2 + \tfrac{7}{42}n \big). \end{align}$$

Ancient period
The history of the problem begins in antiquity and coincides with that of some of its special cases. The case $$p = 1 $$ coincides with that of the calculation of the arithmetic series, the sum of the first $$ n $$ values of an arithmetic progression. This problem is quite simple but the case already known by the Pythagorean school for its connection with triangular numbers is historically interesting:
 * $$1+2+\dots+n=\frac{1}{2}n^2+\frac{1}{2}n, $$ Polynomial $$ S_{1,1}^1(n)$$ calculating the sum of the first $$ n $$ natural numbers.

For $$ m> 1, $$ the first cases encountered in the history of mathematics are:
 * $$1+3+\dots+2n-1=n^2, $$ Polynomial $$S_{1,2}^1(n)$$ calculating the sum of the first $$ n$$ successive odds forming a square. A property probably well known by the Pythagoreans themselves who, in constructing their figured numbers, had to add each time a gnomon consisting of an odd number of points to obtain the next perfect square.
 * $$1^2+2^2+\ldots+n^2=\frac{1}{3}n^3+\frac{1}{2}n^2+\frac{1}{6}n, $$ Polynomial $$S_{1,1}^2(n) $$ calculating the sum of the squares of the successive integers. Property that we find demonstrated in Spirals, a work of Archimedes;
 * $$1^3+2^3+\ldots+n^3=\frac{1}{4}n^4+\frac{1}{2}n^3+\frac{1}{4}n^2, $$ Polynomial $$S_{1,1}^3(n)$$ calculating the sum of the cubes of the successive integers. Corollary of a theorem of  Nicomachus of Gerasa...

L'insieme $$S_{1,1}^m(n) $$ of the cases, to which the two preceding polynomials belong, constitutes the classical problem of powers of successive integers.

Middle period
Over time, many other mathematicians became interested in the problem and made various contributions to its solution. These include Aryabhata, Al-Karaji, Ibn al-Haytham, Thomas Harriot, Johann Faulhaber, Pierre de Fermat and Blaise Pascal who recursively solved the problem of the sum of powers of successive integers by considering an identity that allowed to obtain a polynomial of degree $$ m + 1 $$ already knowing the previous ones.

Faulhaber's formula is also called Bernoulli's formula. Faulhaber did not know the properties of the coefficients later discovered by Bernoulli. Rather, he knew at least the first 17 cases, as well as the existence of the Faulhaber polynomials for odd powers described below.



In 1713, Jacob Bernoulli published under the title Summae Potestatum an expression of the sum of the $p$ powers of the $n$ first integers as a ($p + 1$)th-degree polynomial function of $n$, with coefficients involving numbers $B_{j}$, now called Bernoulli numbers:
 * $$ \sum_{k=1}^n k^{p} = \frac{n^{p+1}}{p+1}+\frac{1}{2}n^p+{1 \over p+1}

\sum_{j=2}^p {p+1 \choose j} B_j n^{p+1-j}.$$

Introducing also the first two Bernoulli numbers (which Bernoulli did not), the previous formula becomes

using the Bernoulli number of the second kind for which, or

using the Bernoulli number of the first kind for which

A rigorous proof of these formulas and Faulhaber's assertion that such formulas would exist for all odd powers took until, two centuries later. Jacobi benefited from the progress of mathematical analysis using the development in infinite series of an exponential function generating Bernoulli numbers.

Modern period
In 1982 A.W.F. Edwards publishes an article in which he shows that Pascal's identity can be expressed by means of triangular matrices containing the Pascal's triangle deprived of 'last element of each line:


 * $$\begin{pmatrix}

n\\ n^2\\ n^3\\ n^4\\ n^5\\ \end{pmatrix}=\begin{pmatrix} 1 &0 &0 &0 &0\\ 1&2&0 &0 &0 \\ 1&3&3&0 &0 \\ 1&4&6&4 &0 \\ 1&5&10&10&5 \end{pmatrix}\begin{pmatrix} n\\ \sum_{k=0}^{n-1} k^1\\ \sum_{k=0}^{n-1} k^2\\ \sum_{k=0}^{n-1} k^3\\ \sum_{k=0}^{n-1} k^4\\ \end{pmatrix}$$

The example is limited by the choice of a fifth order matrix but is easily extendable to higher orders. The equation can be written as: $$\vec{N}=A\vec{S} $$ and multiplying the two sides of the equation to the left by $$ A^{-1} $$, inverse of the matrix A, we obtain $$ A^{-1}\vec{N}=\vec{S} $$ which allows to arrive directly at the polynomial coefficients without directly using the Bernoulli numbers. Other authors after Edwards dealing with various aspects of the power sum problem take the matrix path and studying aspects of the problem in their articles useful tools such as the Vandermonde vector. Other researchers continue to explore through the traditional analytic route and generalize the problem of the sum of successive integers to any geometric progression

Proof with exponential generating function
Let

denote the sum under consideration for integer $$p\ge 0.$$

Define the following exponential generating function with (initially) indeterminate $$z$$

We find

This is an entire function in $$z$$ so that $$z$$ can be taken to be any complex number.

We next recall the exponential generating function for the Bernoulli polynomials $$B_j(x)$$

where $$B_j=B_j(0)$$ denotes the Bernoulli number with the convention $$B_{1}=-\frac{1}{2}$$. This may be converted to a generating function with the convention $$B^+_1=\frac{1}{2}$$ by the addition of $$j$$ to the coefficient of $$x^{j-1}$$ in each $$B_j(x)$$ ($$B_0$$ does not need to be changed):

It follows immediately that

for all $$p$$.

Faulhaber polynomials
The term Faulhaber polynomials is used by some authors to refer to another polynomial sequence related to that given above.

Write $$a = \sum_{k=1}^n k = \frac{n(n+1)}{2}. $$ Faulhaber observed that if p is odd then $\sum_{k=1}^n k^p$ is a polynomial function of a.



For p = 1, it is clear that $$\sum_{k=1}^n k^1 = \sum_{k=1}^n k = \frac{n(n+1)}{2} = a. $$ For p = 3, the result that $$\sum_{k=1}^n k^3 = \frac{n^2(n+1)^2}{4} = a^2 $$ is known as Nicomachus's theorem.

Further, we have $$ \begin{align} \sum_{k=1}^n k^5 &= \frac{4a^3 - a^2}{3} \\ \sum_{k=1}^n k^7 &= \frac{6a^4 -4a^3 + a^2}{3} \\ \sum_{k=1}^n k^9 &= \frac{16a^5 - 20a^4 +12a^3 - 3a^2}{5} \\ \sum_{k=1}^n k^{11} &= \frac{16a^6 - 32a^5 + 34a^4 - 20a^3 + 5a^2}{3} \end{align} $$ (see, , , , ).

More generally, $$ \sum_{k=1}^n k^{2m+1} = \frac{1}{2^{2m+2}(2m+2)} \sum_{q=0}^m \binom{2m+2}{2q} (2-2^{2q})~ B_{2q} ~\left[(8a+1)^{m+1-q}-1\right]. $$

Some authors call the polynomials in a on the right-hand sides of these identities Faulhaber polynomials. These polynomials are divisible by $a^{2}$ because the Bernoulli number $B_{j}$ is 0 for odd $j > 1$.

Inversely, writing for simplicity $$s_j: = \sum_{k=1}^n k^j$$, we have $$ \begin{align} 4a^3 &= 3s_5 +s_3 \\ 8a^4 &= 4s_7+4s_5 \\ 16a^5 &= 5s_9+10s_7+s_5 \end{align} $$ and generally $$ 2^{m-1} a^m = \sum_{j>0} \binom{m}{2j-1} s_{2m-2j+1}.$$

Faulhaber also knew that if a sum for an odd power is given by $$\sum_{k=1}^n k^{2m+1} = c_1 a^2 + c_2 a^3 + \cdots + c_m a^{m+1}$$ then the sum for the even power just below is given by $$\sum_{k=1}^n k^{2m} = \frac{n+\frac12}{2m+1}(2 c_1 a + 3 c_2 a^2+\cdots + (m+1) c_m a^m).$$ Note that the polynomial in parentheses is the derivative of the polynomial above with respect to a.

Since a = n(n + 1)/2, these formulae show that for an odd power (greater than 1), the sum is a polynomial in n having factors n2 and (n + 1)2, while for an even power the polynomial has factors n, n + 1/2 and n + 1.

Expressing products of power sums as linear combinations of power sums
Products of two (and thus by iteration, several) power sums $$s_{j_r}:=\sum_{k=1}^n k^{j_r} $$ can be written as linear combinations of power sums with either all degrees even or all degrees odd, depending on the total degree of the product as a polynomial in $$n $$, e.g. $$30 s_2s_4=-s_3+15s_5+16s_7 $$. Note that the sums of coefficients must be equal on both sides, as can be seen by putting $$n=1 $$, which makes all the $$s_j $$ equal to 1. Some general formulae include: $$ \begin{align} (m+1)s_m^2 &= 2\sum_{j=0}^{\lfloor\frac{m}2\rfloor}\binom{m+1}{2j}(2m+1-2j)B_{2j}s_{2m+1-2j}.\\ m(m+1)s_ms_{m-1}&=m(m+1)B_ms_m+\sum_{j=0}^{\lfloor\frac{m-1}2\rfloor}\binom{m+1}{2j}(2m+1-2j)B_{2j}s_{2m-2j}.\\ 2^{m-1} s_1^m &= \sum_{j=1}^{\lfloor\frac{m+1}2\rfloor} \binom{m}{2j-1} s_{2m+1-2j}.\end{align}$$ Note that in the second formula, for even $$m $$ the term corresponding to $$j=\dfrac m2 $$ is different from the other terms in the sum, while for odd $$m $$, this additional term vanishes because of $$B_m=0 $$.

Matrix form
Faulhaber's formula can also be written in a form using matrix multiplication.

Take the first seven examples $$\begin{align} \sum_{k=1}^n k^0 &= \phantom{-}1n \\ \sum_{k=1}^n k^1 &= \phantom{-}\tfrac{1}{2}n+\tfrac{1}{2}n^2 \\ \sum_{k=1}^n k^2 &= \phantom{-}\tfrac{1}{6}n+\tfrac{1}{2}n^2+\tfrac{1}{3}n^3 \\ \sum_{k=1}^n k^3 &= \phantom{-}0n+\tfrac{1}{4}n^2+\tfrac{1}{2}n^3+\tfrac{1}{4}n^4 \\ \sum_{k=1}^n k^4 &= -\tfrac{1}{30}n+0n^2+\tfrac{1}{3}n^3+\tfrac{1}{2}n^4+\tfrac{1}{5}n^5 \\ \sum_{k=1}^n k^5 &= \phantom{-}0n-\tfrac{1}{12}n^2+0n^3+\tfrac{5}{12}n^4+\tfrac{1}{2}n^5+\tfrac{1}{6}n^6 \\ \sum_{k=1}^n k^6 &= \phantom{-}\tfrac{1}{42}n+0n^2-\tfrac{1}{6}n^3+0n^4+\tfrac{1}{2}n^5+\tfrac{1}{2}n^6+\tfrac{1}{7}n^7. \end{align}$$ Writing these polynomials as a product between matrices gives $$\begin{pmatrix} \sum k^0 \\ \sum k^1 \\ \sum k^2 \\ \sum k^3 \\ \sum k^4 \\ \sum k^5 \\ \sum k^6 \end{pmatrix} = G_7 \begin{pmatrix} n \\ n^2 \\ n^3 \\ n^4 \\ n^5 \\ n^6 \\ n^7 \end{pmatrix} ,$$ where

Surprisingly, inverting the matrix of polynomial coefficients yields something more familiar: $$ G_7^{-1}=\begin{pmatrix} 1& 0&   0&   0&   0&   0& 0\\ -1&  2&   0&   0&   0&   0& 0\\ 1& -3&   3&   0&   0&   0& 0\\ -1&  4&  -6&   4&   0&   0& 0\\ 1& -5&  10& -10&   5&   0& 0\\ -1&  6& -15&  20& -15&   6& 0\\ 1& -7&  21& -35&  35& -21& 7\\ \end{pmatrix} = \overline{A}_7 $$

In the inverted matrix, Pascal's triangle can be recognized, without the last element of each row, and with alternating signs.

Let $$A_7$$ be the matrix obtained from $$\overline{A}_7$$ by changing the signs of the entries in odd diagonals, that is by replacing $$a_{i,j}$$ by $$(-1)^{i+j} a_{i,j}$$, let $$\overline{G}_7$$ be the matrix obtained from $$G_7$$ with a similar transformation, then $$ A_7=\begin{pmatrix} 1& 0& 0&  0&  0&  0& 0\\ 1& 2&  0&  0&  0&  0& 0\\ 1& 3&  3&  0&  0&  0& 0\\ 1& 4&  6&  4&  0&  0& 0\\ 1& 5& 10& 10&  5&  0& 0\\ 1& 6& 15& 20& 15&  6& 0\\ 1& 7& 21& 35& 35& 21& 7\\ \end{pmatrix} $$ and $$ A_7^{-1}=\begin{pmatrix} 1& 0& 0& 0& 0&0& 0\\ -{1\over 2}& {1\over 2}& 0& 0& 0& 0& 0\\ {1\over 6}& -{1\over 2}&{1\over 3}& 0& 0& 0& 0\\ 0& {1\over 4}& -{1\over 2}& {1\over 4}& 0&0& 0\\ -{1\over 30}& 0& {1\over 3}& -{1\over 2}& {1\over 5}&0& 0\\ 0& -{1\over 12}& 0& {5\over 12}& -{1\over 2}& {1\over 6}& 0\\ {1\over 42}& 0& -{1\over 6}& 0& {1\over 2}&-{1\over 2}& {1\over 7} \end{pmatrix}=\overline{G}_7. $$ Also $$\begin{pmatrix} \sum_{k=0}^{n-1} k^0 \\ \sum_{k=0}^{n-1} k^1 \\ \sum_{k=0}^{n-1} k^2 \\ \sum_{k=0}^{n-1} k^3 \\ \sum_{k=0}^{n-1} k^4 \\ \sum_{k=0}^{n-1} k^5 \\ \sum_{k=0}^{n-1} k^6 \\ \end{pmatrix} = \overline{G}_7\begin{pmatrix} n \\ n^2 \\ n^3 \\ n^4 \\ n^5 \\ n^6 \\ n^7 \\ \end{pmatrix} $$ This is because it is evident that $\sum_{k=1}^{n}k^m-\sum_{k=0}^{n-1}k^m=n^m $ and that therefore polynomials of degree $$m+  1$$ of the form $\frac{1}{m+1}n^{m+1}+\frac{1}{2}n^m+\cdots $  subtracted the monomial difference $$ n^m $$ they become $\frac{1}{m+1}n^{m+1}-\frac{1}{2}n^m+\cdots $.

This is true for every order, that is, for each positive integer $m$, one has $$G_m^{-1} = \overline{A}_m$$ and $$\overline{G}_m^{-1} = A_m.$$ Thus, it is possible to obtain the coefficients of the polynomials of the sums of powers of successive integers without resorting to the numbers of Bernoulli but by inverting the matrix easily obtained from the triangle of Pascal.

Variations
\sum_{k=1}^n k^p= \sum_{k=0}^p \frac1{k+1}{p \choose k} B_{p-k} n^{k+1}. $$ \begin{align} \sum_{k=1}^n k^{p} &= \frac{1}{p+1} \sum_{k=0}^p \binom{p+1}{k} (-1)^kB_k (n+1)^{p-k+1} \\ &= \sum_{k=0}^p \frac{1}{k+1} \binom{p}{k} (-1)^{p-k}B_{p-k} (n+1)^{k+1}, \end{align} $$
 * Replacing $$k$$ with $$p-k$$, we find the alternative expression: $$
 * Subtracting $$n^p$$ from both sides of the original formula and incrementing $$n$$ by $$1$$, we get $$
 * where $$(-1)^kB_k = B^-_k$$ can be interpreted as "negative" Bernoulli numbers with $$B^-_1=-\tfrac12$$.

\begin{align} G(z,n) &= \frac{e^{(n+1)z}}{e^z -1} - \frac{e^z}{e^z -1}\\ &= \sum_{j=0}^{\infty} \left(B_j(n+1)-(-1)^j B_j\right) \frac{z^{j-1}}{j!}, \end{align} $$ which implies $$ \sum_{k=1}^n k^p = \frac{1}{p+1} \left(B_{p+1}(n+1)-(-1)^{p+1}B_{p+1}\right) = \frac{1}{p+1}\left(B_{p+1}(n+1)-B_{p+1}(1) \right). $$ Since $$B_n = 0$$ whenever $$ n > 1$$ is odd, the factor $$ (-1)^{p+1} $$ may be removed when $$p > 0$$. \sum_{k=0}^n k^p = \sum_{k=0}^p \left\{{p\atop k}\right\}\frac{(n+1)_{k+1}}{k+1}, $$ $$ \sum_{k=1}^n k^p = \sum_{k=1}^{p+1} \left\{{p+1\atop k}\right\}\frac{(n)_k}{k}. $$ This is due to the definition of the Stirling numbers of the second kind as mononomials in terms of falling factorials, and the behaviour of falling factorials under the indefinite sum.
 * We may also expand $$G(z,n)$$ in terms of the Bernoulli polynomials to find $$
 * It can also be expressed in terms of Stirling numbers of the second kind and falling factorials as $$

Interpreting the Stirling numbers of the second kind, $$\left\{{p+1\atop k}\right\}$$, as the number of set partitions of $$\lbrack p+1\rbrack$$ into $$k$$ parts, the identity has a direct combinatorial proof since both sides count the number of functions $$f:\lbrack p+1\rbrack-> \lbrack n\rbrack $$ with $$f(1)$$ maximal. The index of summation on the left hand side represents $$k=f(1)$$, while the index on the right hand side is represents the number of elements in the image of f.
 * There is also a similar (but somehow simpler) expression: using the idea of telescoping and the binomial theorem, one gets Pascal's identity:
 * This in particular yields the examples below – e.g., take $k = 1$ to get the first example. In a similar fashion we also find


 * A generalized expression involving the Eulerian numbers $$A_n(x)$$ is
 * $$\sum_{n=1}^\infty n^k x^n=\frac{x}{(1-x)^{k+1}}A_k(x)$$.


 * Faulhaber's formula was generalized by Guo and Zeng to a $q$-analog.

Relationship to Riemann zeta function
Using $$B_k=-k\zeta(1-k)$$, one can write

If we consider the generating function $$G(z,n)$$ in the large $$n$$ limit for $$\Re (z)<0$$, then we find

Heuristically, this suggests that

This result agrees with the value of the Riemann zeta function $\zeta(s)=\sum_{n=1}^{\infty}\frac{1}{n^s}$ for negative integers $$s=-p<0$$ on appropriately analytically continuing $$\zeta(s)$$.

Umbral form
In the umbral calculus, one treats the Bernoulli numbers $B^0 = 1$, $B^1 = \frac{1}{2}$ , $B^2 = \frac{1}{6}$ , ... as if the index j in $B^j$ were actually an exponent, and so as if the Bernoulli numbers were powers of some object B.

Using this notation, Faulhaber's formula can be written as $$ \sum_{k=1}^n k^p = \frac{1}{p+1} \big( (B+n)^{p+1} - B^{p+1} \big). $$ Here, the expression on the right must be understood by expanding out to get terms $B^j$ that can then be interpreted as the Bernoulli numbers. Specifically, using the binomial theorem, we get $$\begin{align} \frac{1}{p+1} \big( (B+n)^{p+1} - B^{p+1} \big) &= {1 \over p+1} \left( \sum_{k=0}^{p+1} \binom{p+1}{k} B^k n^{p+1-k} - B^{p+1} \right) \\ &= {1 \over p+1} \sum_{k=0}^{p} \binom{p+1}{j} B^k n^{p+1-k}. \end{align}$$

A derivation of Faulhaber's formula using the umbral form is available in The Book of Numbers by John Horton Conway and Richard K. Guy.

Classically, this umbral form was considered as a notational convenience. In the modern umbral calculus, on the other hand, this is given a formal mathematical underpinning. One considers the linear functional T on the vector space of polynomials in a variable b given by $T(b^j) = B_j.$ Then one can say $$\begin{align} \sum_{k=1}^n k^p &= {1 \over p+1} \sum_{j=0}^p {p+1 \choose j} B_j n^{p+1-j} \\ &= {1 \over p+1} \sum_{j=0}^p {p+1 \choose j} T(b^j) n^{p+1-j} \\ &= {1 \over p+1} T\left(\sum_{j=0}^p {p+1 \choose j} b^j n^{p+1-j} \right) \\ &= T\left({(b+n)^{p+1} - b^{p+1} \over p+1}\right). \end{align}$$

A General Formula
The series $$1^m + 2^m + 3^m +. . n^m$$ as a function of m is often abbreviated as $$S_m$$. Beardon (see External Links) have published formulas for powers of $$S_m$$. For example, Beardon 1996 stated this general formula for powers of $$S_1:\;\;\;S_1^{\;N} = \frac{1}{2^N}\sum_{r=0}^{N} {N \choose r}S_{N+r}(1-(-1)^{N-r})$$, which shows that $$S_1$$ raised to a power N can be written as a linear sum of terms ...  For example, by taking N to be 2, then 3, then 4 in Beardon's formula we get the identities  $$S_1^{\;2} = S_3,\;\;S_1^{\;3} = \frac{1}{4}S_3 + \frac{3}{4}S_5,\;\; S_1^{\;4} = \frac{1}{2}S_5 + \frac{1}{2}S_7 $$. Other formulae, such as $$S_2^{\;2} = \frac{1}{3}S_4 + \frac{2}{3}S_5 $$ and  $$S_2^{\;3} = \frac{1}{12}S_4 + \frac{7}{12}S_6+ \frac{1}{3}S_8$$  are known but  no general formula for $$S_m^{\;N}$$,   where m, N are positive integers,  has been published to date. In an unpublished paper by Derby (2019) the following formula was stated and proved: $$S_m^{\;N} = \sum_{k=1}^{N}(-1)^{k-1} {N \choose k}\sum_{r=1}^{n}r^{mk}S_m^{\;\;N-k}(r)$$. This can be calculated in matrix form, as described above. In the case when m = 1 it replicates Beardon's formula for $$S_1^{\;N}$$. When m = 2 and N = 2 or 3 it generates the given formulas for $$S_2^{\;\;2}$$ and $$S_2^{\;3}$$. Examples of calculations for higher indices are $$S_2^{\;4} = \frac{1}{54}S_5 + \frac{5}{18}S_7 + \frac{5}{9}S_9 + \frac{4}{27}S_{11} $$ and $$S_6^{\;3} = \frac{1}{588}S_8 - \frac{1}{42}S_{10} + \frac{13}{84}S_{12}- \frac{47}{98}S_{14}+ \frac{17}{28}S_{16} + \frac{19}{28}S_{18}+ \frac{3}{49}S_{20}$$.