Skip to main content
2 of 4
added 127 characters in body
kglr
  • 400.5k
  • 18
  • 488
  • 929
SeedRandom[1] 
While[Length[pr = Select[FreeQ @ 0] @
   PowersRepresentations[RandomInteger[{2, 10^6}], 3, 3]] < 2]; //
     AbsoluteTiming // First
0.0009008
 {{a, b, c}, {d, k, f}, n} = Join[pr[[;;2]], {Total[pr[[1]]^3]}]
{{2, 3, 16}, {3, 9, 15}, 4131}
Total[pr^3, {2}]
{4131, 4131}
kglr
  • 400.5k
  • 18
  • 488
  • 929