login
Let c be the n-th composite number; then a(n) is the smallest divisor of c such that a(n) >= sqrt(c).
1

%I #34 Oct 07 2020 05:33:21

%S 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,

%T 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,

%U 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

%N Let c be the n-th composite number; then a(n) is the smallest divisor of c such that a(n) >= sqrt(c).

%H Hugo Pfoertner, <a href="/A305747/b305747.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A033677(A002808(n)). - _David A. Corneth_, Jun 09 2018

%e 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...

%p a_list := proc(b) local L, r; L := NULL;

%p 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

%t Map[SelectFirst[Divisors@ #, Function[k, k >= Sqrt@ #]] &, Select[Range@ 120, CompositeQ]] (* _Michael De Vlieger_, Jun 12 2018 *)

%o (PARI) { forcomposite(n = 1, 200, c = floor(sqrt(n)); for(i = c + !issquare(n), n, if(n%i == 0, print1(i", "); break))) }

%Y Cf. A002808, A033677.

%K nonn,easy

%O 1,1

%A _Dimitris Valianatos_, Jun 09 2018