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.


proc doit {{badx 250} {complete 0}} {
    ## NB: $badx is exclusive upper limit, and also limits y!
    for {set y 1} {$y < $badx} {incr y} {
        set s [expr {$y ** 5}]
        set r5($s) $y           ;# fifth roots of valid sums
    }
    for {set a 1} {$a < $badx} {incr a} {
        set suma [expr {$a ** 5}]
        for {set b 1} {$b <= $a} {incr b} {
            set sumb [expr {$suma + ($b ** 5)}]
            for {set c 1} {$c <= $b} {incr c} {
                set sumc [expr {$sumb + ($c ** 5)}]
                for {set d 1} {$d <= $c} {incr d} {
                    set sumd [expr {$sumc + ($d ** 5)}]
                    if {[info exists r5($sumd)]} {
                        set e $r5($sumd)
                        puts "$e^5 = $a^5 + $b^5 + $c^5 + $d^5"
                        if {!$complete} {
                            return
                        }
                    }
                }
            }
        }
    }
    puts "search complete (x < $badx)"
}
doit