Equal Sums of Like Powers

    Around late September 1999, I came across Jean-Charles Meyrignac's search for Equal Sums of Like Powers. Intrigued by the idea, I devised a few of my own programs to find such equations and had a good deal of success. Then I left the problem for 6 months or so only to find most of my records were beaten. However, on 9/26/2000, Jean-Charles informed me of a new attack on the problem first proposed by Greg Childers involving the so-called 'Integer Relations' algorithms. I knew NTL implemented LLL (Lenstra-Lenstra-Lovasz) and since I was already familiar with using NTL I quickly (in minutes!) put together a program using it to test its effectiveness. I was amazed at the success! Within hours I took over all the records above the 12th power. Greg Childers has further reduced these solutions. This is a major break-through on this problem. With time we can probably tune the LLL algorithm to outperform all other methods for powers greater than 6.

Another interesting result was being able to find several solutions that hold for multiple powers. For instance the following solution (9,22,22) holds for k=9 as well as k={1,2,3,4,5,6,7,8,9}:


(9,22,22):308+310+311*3+315+316*2+317+321*2+324*2+328+329*2+330+334*3+335+337 = 309*3+313+314*4+320*2+322+323+325*2+331*4+332+336*3
It is exciting how fast these solutions are found. The (9,22,22) above was found in just a few minutes! Kudos to Greg Childers for pointing out the Equal Sums problem can be turned into an Integer Relation one.


I'll list various results I find here that aren't collected by their search and along with other things, share some of my ideas on how to find them.

My original strategy

   My original strategy has been what I call 'Fixed-Point Optimal Descent'. I assume the equation I'm looking for has the form 

xk - (x-a)k - (x-b)k ... = F(lhs)

where F(lhs) is the 'optimal descent' representation of the value of the left hand side of the equation. What I do, is make a function to find the optimal (or for speed considerations, greedy/close to optimal) representation of a value as a sum of kth powers. Then, I iterate values of x, and various values for 'a', 'b', etc, for each x, evaluate the lhs then compute its 'optimal descent representation.' If the result doesn't have a small number of terms, we just choose more x, a, b, etc. More on this later...

This is a simple procedure really, but has had a good amount of success. Especially compared to complete iterative methods which don't work well for high powers.


I realized that some of the forms of the equations I was after were impossible. Here is a proof I did on a particular form (perhaps you can construct a more simple version).

My proof that x4 - (x-1)4 = y4 + 1, is impossible.

    I took a look into this on 3/15/00 and completed this proof the same day. :) My original interest was whether or not I could construct a (4,1,3) solution of this form.  I might try to make it more general soon using a similar approach. Here's my proof...

Problem Statement: Show that x4 - (x-1)4 = y4 + 1 has no non-trivial integer solutions.

  1. Consider the equation x4 - (x-1)4 = (x-a)4 + 1. The two non-complex solutions for 'a' in terms of 'x' are: x +/- (4x3 - 6x2 + 4x - 2)1/4.
  2. Let z = 4x3 - 6x2 + 4x - 2. This has to be a perfect fourth power in order for 'a' to be integer. E.g. z = H4, where H is an integer.
  3. First important fact. Any prime divisor of z has to occur a multiple of 4 times, since z = H4.
  4. Let x = u+1, and you will find that 'z' can be represented as z = 2u(2 + 3u + 2u2). To exclude the trivial solution x=1, y=0, we assume x does not equal 1, and so u is non-zero.
  5. Now, you can easily notice that 'u' must be even. For if it was odd, then (2 + 3u + 2u2) would be odd, and so 'z' would only have one prime divisor 2.
  6. Let's find out how many twos divide 'u'. Let u = 2a (2b + 1). That is, a product of some twos and an odd number (All non-zero integers can be represented as such). Using substitution for z = 2u (2 + 3u + 2u2), we see that z = 2a+2 (2b + 1) (1 + 3*2a-1 (2b + 1) + u2). So, 2 either divides 'u' only once, or 4k+2 times.
  7. Note, that since z = 2u(2 + 3u + 2u2), and z = H4, 'u' must have either the form 2d4 or 24k+2d4. This is because any prime divisor of u other than 2, does not divide (2 + 3u + 2u2). So, since z = H4, those divisors must occur in multiples of 4.
  8. We can eliminate the case where 2 only divides 'u' once. For if u = 2d4, z = 4d4 (2 + 6d4 + 8d8) = 16d4 ((1+3d4)/2 + 2d8). Since z = H4, (1+3d4)/2 + 2d8 = (H/2d)4. Representing d = 2h + 1, since d is odd, we have (1+3d4)/2 + 2d8 = 4*(1+5h+13h2+16h3+8h4)*(1+6h+22h2+32h3+16h4). Whether or not h is odd or even, the two polynomial factors are odd and thus this expression contains only 2 twos. It cannot be a fourth power, so 2 must divide 'u' 4k+2 times instead. I.e. 24k+2 | u.
  9. But, we can also eliminate the only remaining case, where 2 divides 'u' (4k+2) times as follows. Represent u = 24k+2 d4. Which can be simplified to just u = 4c4. Substituting into z, we have z = 16c4 (1 + 6c4 + 16c8), which must equal H4. So, 1 + 6c4 + 16c8 = (H/2c)4. Using 'G' as the expression 1 + 6c4 + 16c8, G > 16c8, so G1/4 > 2c2. But, since G < (2c2+1)4, G1/4 < 2c2+1. There are no integers between 2c2 and 2c2+1, so G can never be a fourth power.
  10. This concludes the proof as (8) & (9) contradict (6).

        Using techniques similar to the above, you can show that the equation x5 - (x-1)5 = y5 + 1 can only have integer solutions when x is of the form 54d5. Its likely that this equation has no solution either.

LLL attack

For equations (k,m,n) where k >= 10 and m and n are relatively close, LLL has turned out to be an effective weapon. For example with typical brute force searches the number of terms for k=30 was originally around 3000 to 4000. Now, with LLL this has been reduced to well under 100 (as of 10/10/2000 it was 79).

To use LLL is simple. Just construct a matrix like so...


[[1, 0, 0, 0, 0, 1^k]
 [0, 1, 0, 0, 0, 2^k]
 [0, 0, 1, 0, 0, 3^k]
 [0, 0, 0, 1, 0, 4^k]
 [0, 0, 0, 0, 1, 5^k]]

which is a vector of [1k, 2k, 3k, ..., xk] of terms concatenated on the end of a unit matrix. Typically a good size matrix to start with is 50x51 (the last column containing the list of xk values. After running the LLL routines, you'll have a matrix where each row is a potential solution. A quick example makes this clear. If you start with:
   [[1, 0, 0, 0, 0, 1^4]
    [0, 1, 0, 0, 0, 2^4]
    [0, 0, 1, 0, 0, 3^4]
    [0, 0, 0, 1, 0, 4^4]
    [0, 0, 0, 0, 1, 5^4]]

and run NTL's BKZ_FP() routine on it you will get:
   [[ 1,  0,  0,  0,  0,  1]
    [ 0, -2, -1, -2,  1,  0]
    [ 2, -1, -3,  1,  0, -1]
    [ 0, -3,  2,  2, -1,  1]
    [-5, -1, -6,  2,  0,  5]]

Now, each number in a row represents the coefficient against the corresponding term entry from the original matrix and you can construct solutions as follows:
   1*1 = 1   (trivial)
   0*1 - 2*24 - 1*34 - 2*44 + 1*54 = 0
   2*1 - 1*24 - 3*34 + 1*44 + 0*54 = -1
   0*1 - 3*24 + 2*34 + 2*44 - 1*54 = 1
  -5*1 - 1*24 - 6*34 + 2*44 + 0*54 = 5
   

When the last value in a row is 0 you have an immediate equation that is a possible solution. Otherwise, you simply adjust the equation by adding or subtracting an appropriate number of ones.

LLL Tips and Tricks

Often times adding a constant multiple to the last column helps yield better solutions. I.e. Instead of using xk values, using C*xk. Greg Childers recommends C around 106 and has had a good deal of success.

Another trick is to add "salt" to the final values. I.e. Instead of just xk, or C*xk, try C*xk+1, or C*xk + rand()%4, etc. The coefficients can cancel themselves out in fortuitous ways. :)

Have fun, and if you have new ideas be sure to let me know!


(The rest of this page is under construction).


Joe K. Crump | Number Theory Home