func perf n . for i = 1 to n - 1 if n mod i = 0 sum += i . . return if sum = n . for i = 2 to 10000 if perf i = 1 print i . .