OFFSET
1,3
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
9 has 3 positive divisors. Among the first 9 positive integers, there are four that have more than or equal the number of divisors than 9 has: 4, with 3 divisors; 6, with 4 divisors; 8, with 4 divisors; and 9, with 3 divisors. So a(9) = 4.
MAPLE
L:= [2]: A[1]:= 1:
for n from 2 to 100 do
v:= 2*numtheory:-tau(n);
k:= ListTools:-BinaryPlace(L, v-1);
A[n]:= n-k;
L:= [op(L[1..k]), v, op(L[k+1..-1])];
od:
seq(A[i], i=1..100); # Robert Israel, Sep 26 2018
MATHEMATICA
Table[Length[Select[Range[n], Length[Divisors[ # ]]>=Length[Divisors[n]]&]], {n, 1, 100}] (* Stefan Steinerberger, Feb 29 2008 *)
PROG
(PARI) a(n) = my(dn=numdiv(n)); sum(k=1, n, numdiv(k) >= dn); \\ Michel Marcus, Sep 26 2018
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Leroy Quet, Feb 27 2008
EXTENSIONS
More terms from Stefan Steinerberger, Feb 29 2008
STATUS
approved