login
A305747
Let c be the n-th composite number; then a(n) is the smallest divisor of c such that a(n) >= sqrt(c).
1
2, 3, 4, 3, 5, 4, 7, 5, 4, 6, 5, 7, 11, 6, 5, 13, 9, 7, 6, 8, 11, 17, 7, 6, 19, 13, 8, 7, 11, 9, 23, 8, 7, 10, 17, 13, 9, 11, 8, 19, 29, 10, 31, 9, 8, 13, 11, 17, 23, 10, 9, 37, 15, 19, 11, 13, 10, 9, 41, 12, 17, 43, 29, 11, 10, 13, 23, 31, 47, 19, 12, 14, 11, 10, 17, 13, 15, 53, 12, 11, 37, 14, 19, 23, 29, 13, 59
OFFSET
1,1
LINKS
FORMULA
a(n) = A033677(A002808(n)). - David A. Corneth, Jun 09 2018
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
Sequence in context: A357714 A299757 A159630 * A304736 A371280 A286448
KEYWORD
nonn,easy
AUTHOR
Dimitris Valianatos, Jun 09 2018
STATUS
approved