We’ve all seen the formula for the sum of the first n integers:
A similar formula exists for the sum of the squares of the first n integers.
One day during a particularly boring lecture in one of my gen-ed undergraduate courses I was playing with these formulas and I stumbled across a recursive formula for the sum of the first n integers taken to any integer power. That is,
where
Let’s define a function S such that . The domain of S is the set of nonnegative integers. Let’s begin by investigating several small values of m.
To derive an iterative formula for , let’s investigate the function . Let’s partition the interval into unit subintervals: , and draw a rectangle in each subinterval with bottom-left corner at and top-right corner at .
This is similar to using a right endpoint approximation of the definite integral using rectangles. Since each rectangle has a base of 1 and height of k, then the sum of the areas of these rectangles is .
Let’s find the sum of the areas of the rectangles by partitioning each rectangle into two parts: the parts above (pink) and below the curve (red). Adding them together will give the area of any particular rectangle.
Similarly, we can derive an iterative formula for .
Let’s begin to investigate the general case .
But we can expand using the Binomial Theorem.
Substituting into the above equation for ,
These terms cancel and filling in the ,
Or if we write it in terms of ,
.
We now have a recursive formula for . Let’s try it out with
The results for larger values of m are summarized in the following table.
The following table simply contains the coefficients of the expanded function where the i-th entry is the coefficient of .