The Meta-Formula for 1^n + 2^n + 3^n + ... + x^n
[There’s a better version of this post coming when I copy over https://howsridharthinks.wordpress.com/2019/11/19/difference-equations-infinite-sums-generalized-factorial-zeta-functions-etc/, but it’s not fully ready yet. This is an archive of an old Quora answer, in the meanwhile. This is just for the sake of copying everything from the Wordpress site over to the Github site.]
You’ve probably seen formulas such
Well, the answer (er, to the second question) is a resounding YES! Here is a general technique that will quite readily, quite easily give you the formula for the sum of consecutive values of any polynomial, as another polynomial. Indeed, here is a “meta-formula” for the desired formula.
Actually, I will explain this same underlying idea twice, in somewhat different ways. Once a little less abstractly, and once a little more abstractly. You may read whichever of these tickles your fancy best; whichever gives you the clearest understanding.
The less abstract presentation
Suppose you already have a nice formula for
Well,
But we want them to match exactly! So to cancel out this constant, we can add an extra linear term to
So that’s it, then. To get a formula for
Thus, since we know that the formula for the sum of the first
Next, to get the formula for
Next, to get the formula for
And so on and so on; continuing in this way, we get the formulas for any degree we like.
The more abstract presentation
Consider the linear “forward difference” operator which sends the polynomial
But how do we find such a
Well, let’s consider two other linear operators of note on polynomials, that are closely related to this difference operator. First of all, there’s “differentiation” (in the sense of taking the derivative), whose name already belies it closeness; this is the familiar operator from calculus which sends
Let’s make more explicit the sense in which differentiation and forward difference are related. In particular, let’s note that we have, by Taylor expansion, that
(For what it’s worth, though these are phrased as infinite series here, when applied to any particular polynomial, only finitely many terms are nonzero, as
Let’s see how this helps us with our goal. We wanted to find a
Now it’s easy enough to solve. Factoring a
Actually, because
So we have that
This completes our general technique. Let’s apply it to, for example, the particular question of a formula for
Suppose
Taking this to be
But the great value of the discussion in this post is that we do not need to apply new cleverness to solving this type of problem again for each new polynomial or degree of powers to be summed. We can mechanically produce the answers for each, simply applying
This technique is general enough that it even works for some functions which aren’t polynomials, producing answers as convergent infinite series, which then can be used to interpolate/extrapolate the corresponding “sum consecutive values” function to new contexts beyond where this sum would ordinarily be interpretable. For example, these kinds of ideas can be used to generalize the factorial to non-integer arguments (by generalizing the logarithmic factorial, which is a sum of consecutive logarithms; of course, we’ve seen already how to generalize the factorial anyway, at [TODO: insert link]), and to extend the Riemann and Hurwitz zeta functions to arbitrary inputs (as with every topic I mention in passing, I promise I will write more on this in a later post…). It’s a very valuable idea to be aware of.
[TODO: Add the million others way of looking at this; e.g., through Stirling numbers of the first and second kinds, and through the Hurwitz zeta function.]