Calculate the sequence where each term an is the smallest natural number greater than the previous term, that has exactly n divisors.



Task
Show here, on this page, at least the first 15 terms of the sequence.



See also
 OEIS:A069654


Related tasks
 Sequence: smallest number with exactly n divisors
 Sequence: nth number with exactly n divisors‎‎


CARD FUNC CountDivisors(CARD a)
  CARD i,count
 
  i=1 count=0
  WHILE i*i<=a
  DO
    IF a MOD i=0 THEN
      IF i=a/i THEN
        count==+1
      ELSE
        count==+2
      FI
    FI
    i==+1
  OD
RETURN (count)
 
PROC Main()
  CARD a
  BYTE i
 
  a=1
  FOR i=1 TO 15
  DO
    WHILE CountDivisors(a)#i
    DO
      a==+1
    OD
    IF i>1 THEN
      Print(", ")
    FI
    PrintC(a)
  OD
RETURN