OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
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