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”).

A087133
Number of divisors of n that are not greater than the greatest prime-factor of n; a(1)=1.
2
1, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 3, 2, 2, 3, 2, 4, 3, 3, 2, 3, 2, 3, 2, 4, 2, 4, 2, 2, 3, 3, 3, 3, 2, 3, 3, 4, 2, 5, 2, 4, 3, 3, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 3, 2, 5, 2, 3, 3, 2, 3, 5, 2, 4, 3, 4, 2, 3, 2, 3, 3, 4, 3, 5, 2, 4, 2, 3, 2, 6, 3, 3, 3, 5, 2, 4, 3, 4, 3, 3, 3, 3, 2, 3, 4, 4
OFFSET
1,2
COMMENTS
For n > 1, a(n) is the index of the greatest prime factor of n among the divisors of n (see A027750). - Michel Marcus, Jan 21 2019
LINKS
Eric Weisstein's World of Mathematics, Divisor Function
Eric Weisstein's World of Mathematics, Greatest Prime Factor
FORMULA
a(n) <= A000005(n), a(n)=A000005(n) iff n is prime or n=1;
a(n)=2 iff n > 1 is a prime power (A000961);
a(A087134(n))=n and a(k) < n for k < A087134(n).
EXAMPLE
n=28: gpf(28)=7 and divisors = {1,2,4,7,14,28}: 1<=7, 2<=7, 4<=7 and 7<=7, therefore a(28)=4.
MATHEMATICA
Table[Count[Divisors[n], _?(#<=FactorInteger[n][[-1, 1]]&)], {n, 100}] (* Harvey P. Dale, May 01 2016 *)
PROG
(PARI) a(n) = if (n==1, 1, my(f = factor(n), gpf = f[#f~, 1]); sumdiv(n, d, d <= gpf)); \\ Michel Marcus, Sep 21 2014
(PARI) a(n) = if (n==1, 1, vecsearch(divisors(n), vecmax(factor(n)[, 1]))); \\ Michel Marcus, Jan 21 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Aug 17 2003
STATUS
approved