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

A138222
a(n) = the largest divisor of n that is <= the number of positive divisors of n.
4
1, 2, 1, 2, 1, 3, 1, 4, 3, 2, 1, 6, 1, 2, 3, 4, 1, 6, 1, 5, 3, 2, 1, 8, 1, 2, 3, 4, 1, 6, 1, 4, 3, 2, 1, 9, 1, 2, 3, 8, 1, 7, 1, 4, 5, 2, 1, 8, 1, 5, 3, 4, 1, 6, 1, 8, 3, 2, 1, 12, 1, 2, 3, 4, 1, 6, 1, 4, 3, 7, 1, 12, 1, 2, 5, 4, 1, 6, 1, 10, 3, 2, 1, 12, 1, 2, 3, 8, 1, 10, 1, 4, 3, 2, 1, 12, 1, 2, 3, 5, 1, 6, 1
OFFSET
1,2
LINKS
EXAMPLE
There are four positive divisors of 15: (1,3,5,15). The largest of these divisors that is <=4 is 3; so a(15) = 3.
MAPLE
A138222 := proc(n) t := numtheory[tau](n) ; dvs := sort(convert(numtheory[divisors](n), list)) ; for i from 1 do if op(-i, dvs) <= t then RETURN( op(-i, dvs)) ; fi; od: end: seq(A138222(n), n=1..100) ; # R. J. Mathar, Jul 20 2009
MATHEMATICA
Table[Last[Select[Divisors[n], #<=DivisorSigma[0, n]&]], {n, 120}] (* Harvey P. Dale, Apr 04 2011 *)
PROG
(PARI) A138222(n) = { my(pd=0, u=numdiv(n)); fordiv(n, d, if(d>u, return(pd)); pd=d); (pd); }; \\ Antti Karttunen, Apr 01 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 06 2008
EXTENSIONS
Extended beyond a(16) by R. J. Mathar, Jul 20 2009
STATUS
approved