RosettaCodeData/Task/Perfect-numbers/Phix/perfect-numbers-1.phix
2024-03-06 22:25:12 -08:00

7 lines
142 B
Text

function is_perfect(integer n)
return sum(factors(n,-1))=n
end function
for i=2 to 100000 do
if is_perfect(i) then ?i end if
end for