|
MATHEMATICA
|
subtract = If[ #1 < #2, Throw[ #1], #1 - #2]&; f[n_] := Catch @ Fold[subtract, n, Divisors @ n]; (from Bobby R. Treat, (DrBob(AT)bigfoot.com), Jul 14 2005) a = False; Do[b = IntegerQ[ Sqrt[ f[ n]]]; If[{a, b} == {True, True}, Print[n - 1]]; a = b, {n, 10^7}] (from Robert G. Wilson v (rgwv(AT)rgwv.com), Jul 21 2005)
|