Newly Discovered Method for Summing nth Powers of Integers

  • Thread starter Thread starter ktoz
  • Start date Start date
  • Tags Tags
    Integers Method
ktoz
Messages
170
Reaction score
12
While responding to another thread about summing nth powers of integers, I came up with what might be a new method. There is an old one (Faulhabers formula) http://mathworld.wolfram.com/FaulhabersFormula.html" , but mine seems to be considerably simpler.

Most likely, someone has already discovered this, but I wouldn't know, no math training beyond high school...

<br /> \sum_{j=0}^m j^p \quad = \quad p! \sum_{j=0}^m Q_{pj} R_{pmj}<br />

<br /> Q_{pk} \quad = \quad \left\{<br /> \begin{array}{ll}<br /> \sum_{j=0}^k -1^j \frac{ (k - j + 1)^p}{j!(p - j)!} \quad &amp; k &lt; p \\<br /> 1 &amp; k \geq p<br /> \end{array}<br />

<br /> R_{pmk} \quad = \quad \prod_{l=1}^p 1 + \frac{m - l}{k}<br />

Ken

Added later: With a slight variation, equation also yeilds the following interesting relation

<br /> x^n \quad = \quad p! \sum_{j=0}^x Q_{nj} R_{n-1xj}<br />
 
Last edited by a moderator:
Mathematics news on Phys.org
What is R_{pmk} when k=0? As it is you are dividing by zero. Ignoring this division by zero problem for the moment, you'd end up with a polynomial in m of degree p. This can't be correct. You'll notice that Faulhaber's gives a polynomial of degree p+1 for the sum of pth powers, and if yours is giving a polynomial then they must be equal.

In any case Faulber's still seems simpler as it tells you the coefficients of this polynomial directly (in terms of the Bernoulli coefficients), rather than a sum over m polynomials (as yours is summing over the R's)
 
shmoe said:
What is R_{pmk} when k=0? As it is you are dividing by zero.

Right you are. I worked out all the details/got it working in AppleScript and got mixed up translating AppleScript to mathematical notation. It should be:

<br /> R_{pmk} \quad = \quad \prod_{l=1}^p 1 + \frac{m - k}{l}<br />
Ignoring this division by zero problem for the moment, you'd end up with a polynomial in m of degree p. This can't be correct. You'll notice that Faulhaber's gives a polynomial of degree p+1 for the sum of pth powers, and if yours is giving a polynomial then they must be equal.

Does the above change solve the "p" vs "p+1" problem? The notation may be off, but the testing program works fine.

In any case Faulber's still seems simpler as it tells you the coefficients of this polynomial directly (in terms of the Bernoulli coefficients), rather than a sum over m polynomials (as yours is summing over the R's)

I checked out Bernoulli numbers http://mathworld.wolfram.com/BernoulliNumber.html" and, speaking in programming terms, \frac{x}{e^x - 1} is an illusion of sorts in that you still have to perform a loop to calculate e^x. The real representation would be

<br /> \frac{x}{-1 + \prod_{j=0}^x e}<br />

Since "e" is a trancendental, the calculations would be more intensive than the simple integers I'm working with in R_{pmk}. So Bernoullis may look cleaner symbolically, but in practice, wouldn't \prod_{j=1}^l 1 + \frac{m - j}{l} actually run faster?
 
Last edited by a moderator:
If that actually works, I would imagine the fact that it doesn't need the Bernoulli numbers would cause it run faster for large values of p.
 
It works nicely (at least the script does). I'm a mathematical notation newbie, but I think it's correct now with the fix:

<br /> R_{pmk} \quad = \quad \prod_{l=1}^p 1 + \frac{m - k}{l}<br />
 
Latex doesn't seem to be turning up when I rty to preview, so here's hoping it works and I didn't make any typos.

ktoz said:
Right you are. I worked out all the details/got it working in AppleScript and got mixed up translating AppleScript to mathematical notation. It should be:
<br /> R_{pmk} \quad = \quad \prod_{l=1}^p 1 + \frac{m - k}{l}<br />

edit-the latex I had here still wasn't displaying properly, but it's redundant. I figured out what seemed to be wrong, what you've got gives the sum up to (m+1)^p, not just m^p. No biggie, but otherwise it seems to work.

ktoz said:
Does the above change solve the "p" vs "p+1" problem? The notation may be off, but the testing program works fine.

Sorry, forget about that. Yours isn't going to be a polynomial at all (not in the way I was implying), I'm not sure what I was thinking.

ktoz said:
I checked out Bernoulli numbers http://mathworld.wolfram.com/BernoulliNumber.html" and, speaking in programming terms, \frac{x}{e^x - 1} is an illusion of sorts in that you still have to perform a loop to calculate e^x. The real representation would be
<br /> \frac{x}{-1 + \prod_{j=0}^x e}<br />
Since "e" is a trancendental, the calculations would be more intensive than the simple integers I'm working with in R_{pmk}. So Bernoullis may look cleaner symbolically, but in practice, wouldn't \prod_{j=1}^l 1 + \frac{m - j}{l} actually run faster?

e being transcendental doesn't matter (and I don't understand your "real representation"). I don't know the most efficient way to calculate bernoulli numbers, but if you need up to the pth the naive way would involve multiplying two polynomials of degree p (one of which has 0 for half it's coefficients) and recursively solving the coefficients (which isn't as bad as it sounds). What's really nice is once you've found these coefficients you can vary m as much as you like and finding the new value of your power sum just involves evaluating a p+1 degree polynomial.

If you look at your proposed method, you have to find all these R_{pmk} one for each value of k from 1 to m. Each of these involves p multiplications. On the surface this is the same work it would take to find this sum in the obvious way, multiply each number from 1 to m by itself p times then add (though in practice finding a pth power is considerably faster than multiplying p different numbers together). If you then wanted to vary m, it looks like you'd have to go back and recalculate all these R's again. This isn't even taking into account the Q's you have to find using their sum (up to p of these are non-trivial).
 
Last edited by a moderator:
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top