Calculate the sequence where each term an is the nth that has n divisors.

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

See also
OEIS:A073916
Related tasks
Sequence: smallest number greater than previous term with exactly n divisors
Sequence: smallest number with exactly n divisors
with javascript_semantics 
constant LIMIT = 24
include mpfr.e
mpz z = mpz_init()
 
sequence fn = repeat(0,LIMIT) fn[1] = 1
integer k = 1
printf(1,"The first %d terms in the sequence are:\n",LIMIT)
for i=1 to LIMIT do
    if is_prime(i) then
        mpz_ui_pow_ui(z,get_prime(i),i-1)
        printf(1,"%2d : %s\n",{i,mpz_get_str(z)})
    else
        while fn[i]<i do
            k += 1
            integer l = length(factors(k,1))
            if l<=LIMIT and fn[l]<l then
                fn[l] = iff(fn[l]+1<l?fn[l]+1:k)
            end if
        end while
        printf(1,"%2d : %d\n",{i,fn[i]})
    end if
end for
