RosettaCodeData/Task/Arithmetic-Rational/Mathematica/arithmetic-rational-6.math
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

4 lines
126 B
Text

found={};
CheckPerfect[num_Integer]:=If[Total[1/Divisors[num]]==2,AppendTo[found,num]];
Do[CheckPerfect[i],{i,1,2^25}];
found