login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A138009
a(n) = number of positive integers k, k <= n, where d(k) >= d(n); d(n) = number of positive divisors of n.
3
1, 1, 2, 1, 4, 1, 6, 2, 4, 3, 10, 1, 12, 5, 6, 2, 16, 2, 18, 3, 10, 11, 22, 1, 15, 13, 14, 5, 28, 2, 30, 7, 18, 19, 20, 1, 36, 22, 23, 4, 40, 5, 42, 11, 12, 28, 46, 1, 33, 14, 31, 15, 52, 7, 34, 8, 36, 37, 58, 1, 60, 39, 19, 10, 42, 10, 66, 22, 45, 11, 70, 2, 72, 48, 25, 26, 51, 13, 78, 4
OFFSET
1,3
LINKS
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
Sequence in context: A300716 A074919 A362232 * A131755 A375277 A305812
KEYWORD
nonn,look
AUTHOR
Leroy Quet, Feb 27 2008
EXTENSIONS
More terms from Stefan Steinerberger, Feb 29 2008
STATUS
approved