Faulhaber polynomial (source code)

= Faulhaber polynomial
{c}

For a fixed nonnegative <integer> $p$, the <Faulhaber polynomial> $S_p(n)$ is the rational-coefficient <polynomial> satisfying $S_p(n)=\sum_{k=1}^n k^p$ for nonnegative <integers> $n$. It is characterized by $S_p(0)=0$ and $S_p(n)-S_p(n-1)=n^p$.

For example, $S_2(n)=n(n+1)(2n+1)/6$ has degree three and leading coefficient $1/3$. In general the degree is $p+1$ and the leading coefficient is $1/(p+1)$, since taking a finite difference lowers the degree by one. <Faulhaber's formula> constructs these <polynomials> from the <Bernoulli polynomials>.