The series representation of $\sum _{i=0}^{n-1} (-1)^{i+1} \left(\frac{i}{n}\right)^{r}$ Lets consider the:
$$\left(\frac{1}{n}\right)^r-\left(\frac{2}{n}\right)^r+\left(\frac{3}{n}\right)^r-...+\left(\frac{n-1}{n}\right)^r$$
Trying to find any formal serise representation for variable $n$. Have tried the Euler–Maclaurin summation, seems there is no simple way to go to series from there.
I have separated the odd and even parts:
$$\sum _{u=0}^{n-1} (-1)^{u+1}\left(\frac{u}{n}\right)^r=\sum _{u=0}^{\frac{n-2}{2}} \left(\frac{2 u+1}{n}\right)^r-\sum _{u=0}^{\frac{n-1}{2}} \left(\frac{2 u}{n}\right)^r$$
Then for each sum:
$$\sum _{u=0}^{\frac{n-2}{2}} \left(\frac{2 u+1}{n}\right)^r=\frac{1}{2} \left(\left(\frac{2 \left\lfloor \frac{n-2}{2}\right\rfloor +1}{n}\right)^r+\left(\frac{1}{n}\right)^r\right)+\int_0^{\frac{n-2}{2}} \left(\frac{2 u+1}{n}\right)^r \, du + \sum _{k=1}^{\infty } \frac{B_{2 k} \frac{\partial  ^{2 k-1}}{\partial u^{2 k-1}}\left(\frac{2 u+1}{n}\right)^r}{(2 k)!} \biggr|_0^{\lfloor \frac{n-2}{2} \rfloor}$$
$$\sum _{u=0}^{\frac{n-1}{2}} \left(\frac{2 u}{n}\right)^r=\frac{1}{2} \left(\frac{2 \left\lfloor \frac{n-1}{2}\right\rfloor }{n}\right)^r+\int_0^{\frac{n-1}{2}} \left(\frac{2 u}{n}\right)^r \, du+\sum _{k=1}^{\infty } \frac{B_{2 k} \frac{\partial ^{2 k-1}}{\partial u^{2 k-1}}\left(\frac{2 u}{n}\right)^r}{(2 k)!} \biggr|_0^{\lfloor \frac{n-1}{2} \rfloor}$$
Then after extracting for first 2 terms for example for odd $n$ we get nothing simple in terms of series representation:
$$\frac{(n-2)^r-(n-1)^r+\frac{r}{r+1}}{2 n^r}+... +\sum _{k=1}^{\infty }... - \sum _{k=1}^{\infty }...$$
Any hint is appreciated.


Hint: We can write the expression as
\begin{align*}
\color{blue}{\sum_{i=0}^{n-1}(-1)^{i+1}\left(\frac{i}{n}\right)^r}
&=\frac{1}{n^r}\sum_{i=0}^{n-1}(-1)^{i+1}i^r\\
&=\frac{1}{n^r}\left(\sum_{i=0}^{n-1}i^r-\sum_{i=0}^{\left\lfloor\frac{n-1}{2}\right\rfloor}(2i)^r\right)\tag{1}\\
&\,\,\color{blue}{=\frac{1}{n^r}\left(\sum_{i=1}^{n-1}i^r-2^r\sum_{i=1}^{\left\lfloor\frac{n-1}{2}\right\rfloor}i^r\right)}\tag{2}\\
\end{align*}

Comment:

*

*In (1) we split the sum by adding even terms to the left sum and subtracting them twice in the right sum.


*In (2) we note the terms with index $i=0$ are zero and we factor out $2^r$.
You can then apply the Euler-Maclaurin formula to these somewhat easier expressions or you may recall Faulhaber's formula
which is in fact the result of application of the Euler-Maclaurin formula.
