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‎‎


func Divs(N);   \Count divisors of N
int  N, D, C;
[C:= 0;
if N > 1 then
    [D:= 1;
    repeat  if rem(N/D) = 0 then C:= C+1;
            D:= D+1;
    until   D >= N;
    ];
return C;
];
 
int An, N;
[An:= 1;  N:= 0;
loop [if Divs(An) = N then
        [IntOut(0, An);  ChOut(0, ^ );
        N:= N+1;
        if N >= 15 then quit;
        ];
     An:= An+1;
     ];
]