Motivation: I want to find the coefficients for the polynomial that is obtained when one adds together the first $n$ natural numbers to the power of $a$; that is, when you consider $1^{a} + 2^{a} + \cdots + n^{a}$. The way I wanted to do this was: find the polynomial, then take the $j$-th derivative, evaluate at 0, and divide by $j!$. My code to just obtain the polynomials and to take the derivatives are:
f[n_, a_] = Sum[i^(a), {i, 1, n}]
g[d_, a_, n_] = Derivative[d, 0][f][n, a]
So, for example, $g[1,2,n]$ is the first derivative (with respect to $n$) of the polynomial corresponding to $1^2 + 2^2 + \cdots + n^2$.
The Problem: If I try $g[1,2,r]$ or $g[2,2,r]$, everything is fine. If I attempt to try $g[3,2,r]$ (the third derivative, which should just be 2) I get the error:
Infinity::indet: Indeterminate expression 0 ComplexInfinity encountered. >>
I'm not sure what I'm doing wrong; this is true for $g[d,a,n]$ in general, if $d = a+1$. I'm using Mathematica 8.
Series
? Try, for example,Table[Series[Sum[i^(a), {i, 1, n}], {a, 0, 4}] // FullSimplify, {n, 1, 3}] // TableForm
$\endgroup$n
for any natural numbera
. $\endgroup$