I need to find the limit of a sequence indexed by $n\in \Bbb N$. $k$ is fixed natural constant.
The sequence is:
$x_n = \frac{1^k+2^k+3^k+\ldots+n^k}{n^k} - \frac{n}{k+1}$
I tried to solve this problem with Stolz–Cesàro theorem. But I can't find the limit.
While trying to code this equation on Python I've found the limit is about -0.5 from top $(-0.5+\epsilon)$
Thanks to Faulhaber's formula (and DanielFischer):
$$\sum_{p=1}^np^k=\frac{n^{k+1}}{k+1}+\frac{n^k}2+\mathcal O(n^{k-1})$$
$$x_n=\frac12+\mathcal O(n^{-1})$$
Assuming you meant to say 'minus $\frac{n}{k+1}$'.
Thus, the limit is given as
$$\lim_{n\to\infty}x_n=\frac12+\mathcal O(0)=\frac12$$
if it converges.