%I #14 Feb 26 2019 03:40:01
%S 3,5,5,7,3,9,3,7,5,7,3,11,3,5,7,7,3,11,3,9,5,5,3,15,3,5,5,9,3,13,3,7,
%T 5,5,3,15,3,5,5,13,3,11,3,7,7,5,3,15,3,7,5,7,3,11,3,11,5,5,3,19,3,5,5,
%U 7,3,9,3,7,5,9,3,17,3,5,7,7,3,9,3,13,5,5,3,17,3,5,5,7,3,17,3,7,5,5,3,15,3,5
%N a(n) is smallest integer for which the number of integers from 1 to a(n) that are not divisors of n is greater than the number of integers from 1 to a(n) that are divisors of n.
%C Is a(n) always odd?
%C Yes, a(n) is always odd. At a(n) - 1, there are the same number of divisors and non-divisors, so a(n) - 1 is even. - _Franklin T. Adams-Watters_, Feb 09 2018
%e a(6) = 9 because among the integers 1 through 9 we have:
%e Divisors: 1, 2, 3, 6;
%e Non-divisors: 4, 5, 7, 8, 9.
%o (PARI) {for(n=1, 100, k=1; d=divisors(n); while(1, c=0; for(j=1, #d, if(d[j]<=k, c++)); if(k-c<=c, k++, break)); print1(k, ","))} \\ _Klaus Brockhaus_, Aug 18 2008
%Y Cf. A143474 (smallest k such that A141501(k) = 2*n+1). - _Klaus Brockhaus_, Aug 25 2008
%K nonn
%O 1,1
%A _J. Lowell_, Aug 10 2008
%E Extended by _Klaus Brockhaus_, Aug 18 2008