

A138224


a(n) = the nearest divisor of n to the number of positive divisors of n. In case of tie, round down.


4



1, 2, 1, 2, 1, 3, 1, 4, 3, 5, 1, 6, 1, 2, 3, 4, 1, 6, 1, 5, 3, 2, 1, 8, 1, 2, 3, 7, 1, 6, 1, 4, 3, 2, 5, 9, 1, 2, 3, 8, 1, 7, 1, 4, 5, 2, 1, 8, 1, 5, 3, 4, 1, 9, 5, 8, 3, 2, 1, 12, 1, 2, 7, 8, 5, 6, 1, 4, 3, 7, 1, 12, 1, 2, 5, 4, 1, 6, 1, 10, 3, 2, 1, 12, 5, 2, 3, 8, 1, 10, 1, 4, 3, 2, 5, 12, 1, 7, 3, 10, 1, 6
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS

Table of n, a(n) for n=1..102.


EXAMPLE

There are four positive divisors of 15: (1,3,5,15). There are two divisors, 3 and 5, that are nearest 4. We take the smaller divisor, 3 in this case, in case of a tie; so a(15) = 3.


MAPLE

A138224 := proc(n) if n = 1 then RETURN(1); fi; t := numtheory[tau](n) ; dvs := sort(convert(numtheory[divisors](n), list)) ; a := op(1, dvs) ; for i from 2 to nops(dvs) do if abs(op(i, dvs)  t) < abs(at) then a := op(i, dvs) ; fi; od: a ; end: seq(A138224(n), n=1..120) ; # R. J. Mathar, Jul 20 2009


CROSSREFS

Cf. A138221, A138222, A138223, A000005.
Sequence in context: A029216 A153174 A138222 * A181472 A271825 A271875
Adjacent sequences: A138221 A138222 A138223 * A138225 A138226 A138227


KEYWORD

nonn


AUTHOR

Leroy Quet, Mar 06 2008


EXTENSIONS

Extended beyond a(15) by R. J. Mathar, Jul 20 2009


STATUS

approved



