func ndivs n .
   i = 1
   while i <= sqrt n
      if n mod i = 0
         cnt += 2
         if i = n div i
            cnt -= 1
         .
      .
      i += 1
   .
   return cnt
.
n = 1
while n <= 15
   i += 1
   if n = ndivs i
      write i & " "
      n += 1
   .
.
