This question already has an answer here:

Is there any better algorithm to solve this equation other than brute force. $1^k+2^k+3^k+...+n^k=$ formula? Here $k$ is a natural number, $n$ is a natural number.


marked as duplicate by Claude Leibovici, mookid, egreg, Hagen von Eitzen, MathOverview Mar 29 '14 at 12:39

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.