I happen to read this post about trying to get the formula of $\sum_{n=1}^N n^m$ for Perron's formula. The general Perron's formula is
$$\sum'_{n\le x} a(n)=\frac{1}{2\pi i}\int_{\text{Re }s=c}f(s)x^s s^{-1}ds$$
where the prime on the summation indicates that the last term of the sum must be multiplied by 1/2 when x is an integer.
I made the following "ill proof" and want to know where I get it wrong:
Now let $x=N+\epsilon$ for $0<\epsilon <1$, then we can ignore the prime on the summation and write
$$\sum_{n\le N} a(n)=\frac{1}{2\pi i}\int_{\text{Re }s=c}f(s)(N+\epsilon)^s s^{-1}ds$$
Let $a(n)=n^m$, then $f(s)=\zeta(s-m)$. Now the formula above says
$$\sum_{n\le N} n^m=\frac{1}{2\pi i}\int_{\text{Re }s=c}\zeta(s-m)(N+\epsilon)^s s^{-1}ds$$
for $c>m+1$. Shifting the line of integration from $s>m+1$ to $s=1$, the only pole encountered is $s=m+1$ and the residue theorem gives us
$$\sum_{n\le N} n^m=\frac{(N+\epsilon)^{m+1}}{m+1}+\frac{1}{2\pi i}\int_{\text{Re }s=1}\zeta(s-m)(N+\epsilon)^s s^{-1}ds$$
The second term is $O(N)$ as $N$ goes to infinity because $\zeta$ is uniformly bounded in a vertical strip near $1-m$. So for high degree (>=2) terms, the coefficients of the binomial expansion of $\frac{(N+\epsilon)^{m+1}}{m+1}$ shall agree with the expression of $\sum_{n\le N} n^m$, in polynomial of $N$.
Now it turns out this is not true, because the coefficients are dependent on the choice of $\epsilon$.
Where is my mistake?
Thanks!