for n = 1 to 10000 let s = 0 for i = 1 to n / 2 if n % i = 0 then let s = s + i endif next i if s = n then print n, " ", endif wait next n