I agree with the previous answers. However, an elementary direct derivation is possible that avoids bernoulli numbers and calculus and relies on mathematical induction. The following assertion is known to be true:
Given any positive integer k, there exist rational numbers $c_0, c_1, \cdots, c_k$ such that $\forall n\in\mathbb{Z^+}, \sum_{i=0}^n i^k = c_0n^{k+1} + c_1n^k + \cdots + c_kn^1.$
Given a specific value of $k$, you only need to use mathematical induction to derive $c_0, c_1, \cdots, c_k.$
As an example, I will derive $c_0, c_1, c_2, c_3$ for $k=3.$
It is clear that for any coefficients $c_0, \cdots, c_3,$ the formula will be true for n=0. Therefore, it is sufficient to derive coefficients so that if the formula is true for n=N, then the formula must also be true for n=N+1.
By the inductive assumption, $\sum_{i=0}^{N+1} i^3 = c_0N^4 + c_1N^3 + c_2N^2 + c_3N + (N+1)^3.$
$c_0, \cdots, c_3$ must be derived so that the above expression is equal to
$c_0(N+1)^4 + c_1(N+1)^3 + c_2(N+1)^2 + c_3(N+1).$
Grouping expressions by powers of N:
$c_0N^4 = c_0N^4$
$N^3(c_1 + 1) = N^3(4c_0 + c_1)$
$N^2(c_2 + 3) = N^2(6c_0 + 3c_1 + c_2)$
$N^1(c_3 + 3) = N^1(4c_0 + 3c_1 + 2c_2 + c_3)$
$N^0(1) = N^0 (c_0 + c_1 + c_2 + c_3)$
This simplifies to the following 4 linear equations in 4 unknowns:
$1 = 4c_0$
$3 = 6c_0 + 3c_1$
$3 = 4c_0 + 3c_1 + 2c_2$
$1 = 1c_0 + 1c_1 + 1c_2 + 1c_3$
The above pattern (where both the right hand side coefficients and the left hand side coefficients come directly from pascal's triangle) will prevail for any positive integer k. Further, for any positive integer k, the resulting (k+1) linear equations in (k+1) unknowns will permit a direct iterative solution. For example, in this case
$c_0 = 1/4,$ so $c_1 = 1/2$, so $c_2 = 1/4,$ so $c_3 = 0.$
A non-calculus-algebra-only derivation of Bernoulli numbers occurs
by noticing that if you make the change of variable:
$c_0 = \frac{1}{k+1}a_0, \;c_1 = a_1,\;$ and
$\;c_i = \frac{k!}{(i-1)!(k+1-i)!}a_i\;\;$ [for $i>1$]:
Then you will end up with the same equations regardless of the value of k. This leads to a "universal" set of coefficients that can be applied to any value of k. Apparently, this was discovered by Bernoulli in the 1700's, when calculus was just developing.