OFFSET
1,1
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
For n = 19 the 19th composite is 30. a(19) = 6 because 6 is the smallest divisor 30 such that 6 >= sqrt(30) = 5.47722...
MAPLE
a_list := proc(b) local L, r; L := NULL;
for r in remove(isprime, [$3..b]) do L := L, min(select(k-> k^2 >= r, numtheory[divisors](r))) od end: a_list(118); # Peter Luschny, Oct 18 2018
MATHEMATICA
Map[SelectFirst[Divisors@ #, Function[k, k >= Sqrt@ #]] &, Select[Range@ 120, CompositeQ]] (* Michael De Vlieger, Jun 12 2018 *)
PROG
(PARI) { forcomposite(n = 1, 200, c = floor(sqrt(n)); for(i = c + !issquare(n), n, if(n%i == 0, print1(i", "); break))) }
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Dimitris Valianatos, Jun 09 2018
STATUS
approved