func prodivs n .
   ans = 1
   i = 1
   j = 1
   while i * i <= n
      if n mod i = 0
         ans *= i
         j = n div i
         if j <> i
            ans *= j
         .
      .
      i += 1
   .
   return ans
.
for i to 50
   write prodivs i & " "
.
