OFFSET
1,1
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..200
EXAMPLE
a(5) = 165 because the divisors of 165 are (165, 55, 33, 15, 11, 5, 3, 1) and prime(5) = 11 is the 5th divisor of 165.
MAPLE
with(numtheory):
a:= proc(n) local k, p; p:= ithprime(n);
for k from p by p while tau(k)<n or
sort([divisors(k)[]], `>`)[n]<>p do od; k
end:
seq(a(n), n=1..50); # Alois P. Heinz, Jun 04 2013
MATHEMATICA
a[n_] := Module[{k, p}, p = Prime[n]; For[k = p, DivisorSigma[0, k] < n || Reverse[Divisors[k]][[n]] != p, k = k + p]; k];
Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Mar 25 2017, after Alois P. Heinz *)
PROG
(PARI) a(n)=my(p=prime(n), k, d); while(k+=p, d=divisors(k); if(#d>=n && d[#d-n+1]==p, return(k))) \\ Charles R Greathouse IV, Jun 04 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Irina Gerasimova, Jun 04 2013
EXTENSIONS
a(5) corrected, a(6)-a(40) from Charles R Greathouse IV, Jun 04 2013
STATUS
approved