Consider a discrete positive random variable, say X. This link nicely shows that
\begin{equation} E[X] = \sum_{k=0}^{\infty} (1-F(k)) \end{equation}
Moreover,
\begin{equation} E[X^2] = \sum_{k=0}^{\infty} (2k+1)(1-F(k)) \end{equation}
I am puzzled on how to obtain the factor "(2k+1)" in above expression. It would be nice, when there were a relation between F(X) and X for higher order moments.