Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- AbsoluteTiming[
- f[x_] := Sort@IntegerDigits[x];
- g[x_] := Module[{t = f[x]},
- Return[f[2 x] == f[3 x] == f[4 x] == f[5 x] == f[6 x] == t]];
- ans = NestWhile[# + 1 &, 1, ! g[#] &]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement