SeedRandom[1] While[Length[pr] < 2, pr = Select[FreeQ @ 0] @ PowersRepresentations[RandomInteger[{2, 10^6}], 3, 3]]; // AbsoluteTiming // First > 5.8*10^-6 {{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}