There is a conjecture in mathematics that held for over two hundred years before it was disproved by the finding of a counterexample in 1966 by Lander and Parkin.



Euler's (disproved) sum of powers   conjecture

  At least  k  positive  kth  powers are required to sum to a  kth  power,  
  except for the trivial case of one  kth power:  yk = yk 



In 1966,   Leon J. Lander   and   Thomas R. Parkin   used a brute-force search on a   CDC 6600   computer restricting numbers to those less than 250.



Task

Write a program to search for an integer solution for:


  x05 + x15 + x25 + x35 == y5 

Where all     xi's   and    y    are distinct integers between   0   and   250   (exclusive).

Show an answer here.



Related tasks

   Pythagorean quadruples. 
   Pythagorean triples.


 
GET "libhdr"
 
LET solve() BE {
    LET pow5 = VEC 249
    LET sum = ?
 
    FOR i = 1 TO 249
        pow5!i := i * i * i * i * i
 
    FOR w = 4 TO 249
        FOR x = 3 TO w - 1
            FOR y = 2 TO x - 1
                FOR z = 1 TO y - 1 {
                    sum := pow5!w + pow5!x + pow5!y + pow5!z
                    FOR a = w + 1 TO 249
                        IF pow5!a = sum {
                            writef("solution found: %d  %d  %d  %d  %d *n", w, x, y, z, a)
                            RETURN
                        }
                }
    writef("Sorry, no solution found.*n")
}    
 
LET start() = VALOF {
    solve()
    RESULTIS 0
}
 