Equalities with Sums of Powers

Introduction

In my previous birth I aspired to be a mathematician (but in a previous.previous birth, I wanted to be an artist... that is a different story. And in previous.previous.previous...)

Of many 'secret formulas' that I found at that time, one simple and beautiful one continues to make me smile. Having seen enough rediscoveries first hand, I share this more for the joy. But if you do find in some place that they have posted some million dollar prize for this, do alert me (I'll give you a cut). Now a teaser...

Did that catch your interest?! No big deal? Oh yeah, you can always find two sets of numbers whose sum is equal. But two equal sized sets of positive integers should get some marks for "cuteness" right? No? At least, note that together it is all the numbers from 1-32, 16 in each set, none repeated! Come on, that should surely raise some tingles from the mathematician in you! Nope? Well, no worries, more surprises up the sleeves...

Ah that SHOULD stump you! See the beauty. Same set of 32 sequential numbers split into two sets, each squared, summed, and the answer is same. I cannot stop starring at it for hours together. To preach the convert, here is more...

Now, even a math doctor out there should see this as a gem. The same two sets of positive integers, when summed together remains equal, even when you square and cube it! I have missed many a nights just seeing this elegance.

History

OK, let me cut the hype and go for some history, and oh yeah the derivation and proof.

The above equation is not a one-off case. It is a cute sample of a general rule, which I stumbled upon when trying (dreaming maybe) to solve an OR (Operation Research) Problem. The problem is: If you are given n books, and asked to arrange it into two stacks, so that the stack height difference is minimal, is there an algorithm that will work always? Looks like this is a NP-complete problem, that is, any know algorithm will take exponentially longer times, as you increase the number of books. Well, I didn't solve this problem (Of course, if I had, I would not be here writing articles on some old number tricks).

But what happened was, while trying to test with easy book thickness, say integers, the above patterns came. Staring point is...

1 2

4 3

That is simple stack right? Surely no big deal for the OR goal, but you can see the direction...

1 + 4 = 2+3

In general,

(a + d1) + (a + d4) = (a + d2) + (a + d3)

if, d1 + d4 = d2 + d3

This is kind of obvious from above. The key is a's quietly gets cancelled. On the first sight, this a should 'almost' go away even if you square each.

(a + d1)2 + (a + d4)2---- (a + d2)2 + (a + d3)2

So,d12 + d42+ 2a(d1 + d4) ---- d22 + d32+ 2a(d2 + d3)

But from above equation in d's, d12 + d42---- d22 + d32

Whatever this inequality be, it is independent of the 'a'. So if we have proper d's as above, then even squares of them will differ, so if you flip that same d's squares, but with a different starting a, then the total sum should be same for both stacks.

This is neat, and looks like this can be generalized to higher powers. before that some examples...

1 + 4 = 2+3

12+ 42---- 22+32

The difference is 4 and similarly for a different a, but same d's

10 + 13 = 11+ 12

102+ 132---- 112+ 122

The Pattern

Instead of going more rigorous, we can see the pattern is:

A |1 V |2VA |3VAAV |4VAAV AVVA |5

Here say, if A = 14 - 23 then V = 23 - 14, is the reverse. Attaching a ruby script (SumOfPowersEqualities.rb) for generating this logic. You can direct the std out to a html file (say ruby SumOfPowersEqualities.rb > soap.html).