OFFSET
1,1
COMMENTS
Is a(n) always odd?
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
EXAMPLE
a(6) = 9 because among the integers 1 through 9 we have:
Divisors: 1, 2, 3, 6;
Non-divisors: 4, 5, 7, 8, 9.
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
J. Lowell, Aug 10 2008
EXTENSIONS
Extended by Klaus Brockhaus, Aug 18 2008
STATUS
approved