In analytic number theory, Perron's formula says that $$ \sum_{1 \leq k < n} a_k + \frac{1}{2}a_n = \int_{c - i\infty}^{c+i\infty} f(s)\frac{n^s}{s}ds, $$ where $f(s) = \sum_{k \geq 1} a_k/k^s$ and $c$ is greater than the abscissa of convergence of $f(s)$. My question is whether Perron's formula can be used as the first step in a derivation of the formula for a sum of powers of the first $n$ integers.
Specifically, for any positive integer $m$, Perron's formula
for $f(s) = \zeta(s-m) = \sum_{k \geq 1} k^m/k^s$ says
$$\sum_{k=1}^n k^m = \frac{1}{2}n^m+\frac{1}{2\pi i}\int_{c-i\infty}^{c+i\infty}\zeta(s-m)\frac{n^s}{s}ds$$
for any $c>m+1$. The integrand $\zeta(s-m)n^s/s$ has poles at $s = 0$ and $s = m+1$.
If we formally shift the line of integration to the left across the pole at $s = m+1$, then a formal use of the residue theorem gives us
$$
\sum_{k=1}^n k^m = \frac{1}{m+1}n^{m+1} + \frac{1}{2}n^m+\frac{1}{2\pi i}\int_{b-i\infty}^{b+i\infty}\zeta(s-m)\frac{n^s}{s}ds
$$
for $b < m+1$. When $m-1/2 < b < m+1$, I can justify this shift (i.e., if I truncate the integral on the top and bottom and make a rectangle
with sides along $x = c$ and $x = b$, the integrals along the top and bottom go to 0 as the height of the rectangle goes to $\pm \infty$).
The two powers of $n$ on the right side are exactly the first two dominant terms in the standard formula for power sums
in terms of Bernoulli numbers:
$$\sum_{k=1}^n k^m = \sum_{j=0}^{m} \dbinom{m}{j}\frac{B_{m-j}}{j+1}n^{j+1} =
\frac{1}{m+1}n^{m+1}+\frac{1}{2}n^m + \sum_{j=0}^{m-2} \dbinom{m}{j}\frac{B_{m-j}}{j+1}n^{j+1}.
$$
What I'd like to know is if anyone sees a way to extract all lower order terms in this standard formula from the integral
along the line ${\rm Re}(s) = b$ when $m-1/2 < b < m+1$. That is, could one show
$$
\frac{1}{2\pi i}\int_{b-i\infty}^{b+i\infty}\zeta(s-m)\frac{n^s}{s}ds = \sum_{j=0}^{m-2} \dbinom{m}{j}\frac{B_{m-j}}{j+1}n^{j+1}
$$
by some method that is independent of knowledge of the power sum formula?
For concreteness, the first four cases of the standard power sum formula are
\begin{eqnarray*}
\sum_{k=1}^n k &=& \frac{1}{2}n^2+\frac{1}{2}n, \\
\sum_{k=1}^n k^2 &=& \frac{1}{3}n^3+\frac{1}{2}n^2 + \frac{1}{6}n, \\
\sum_{k=1}^n k^3 &=& \frac{1}{4}n^4+\frac{1}{2}n^3 + \frac{1}{4}n^2, \\
\sum_{k=1}^n k^4 &=& \frac{1}{5}n^5+\frac{1}{2}n^4 + \frac{1}{3}n^3-\frac{1}{30}n.
\end{eqnarray*}
So when $m=1$ the integral is 0, when $m=2$ the integral is $\frac{1}{6}n$, when
$m = 3$ the integral is $\frac{1}{4}n^2$, and when $m = 4$ the integral is $\frac{1}{3}n^3 - \frac{1}{30}{n}$.
Is there a way to evaluate the integral directly to recover these computations (thereby leading to an alternate proof of the
power sum formula)? Or is there at least a way to see that the integral is $O(n^{m-1})$ as $n \rightarrow \infty$?
The obvious thing to try is to push the contour further to the left, past more poles. Even if that could be justified (is it valid?), the only pole remaining in $\zeta(s-m)n^s/s$ is at $s = 0$, where the residue is $\zeta(-m) = -B_{m+1}/(m+1)$, which doesn't involve $n$ and is not even a term in the power sum formula. Without poles to work with, I don't see a way to extract any lower order terms from the integral.