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.


# EULER.PS1
$max = 250
 
$powers =  New-Object System.Collections.ArrayList
for ($i = 0; $i -lt $max; $i++) {
  $tmp = $powers.Add([Math]::Pow($i, 5)) 
}
 
for ($x0 = 1; $x0 -lt $max; $x0++) {
  for ($x1 = 1; $x1 -lt $x0; $x1++) {
    for ($x2 = 1; $x2 -lt $x1; $x2++) {
      for ($x3 = 1; $x3 -lt $x2; $x3++) {
        $sum = $powers[$x0] + $powers[$x1] + $powers[$x2] + $powers[$x3]
        $S1 = [int][Math]::pow($sum,0.2)
 
        if ($sum -eq $powers[$S1]) {
          Write-host "$x0^5 + $x1^5 + $x2^5 + $x3^5 = $S1^5"
          return
        }
      }
    }
  }
}