OFFSET
1,2
LINKS
FORMULA
EXAMPLE
a(9) = 3 since the divisors of 9 are 1, 3, 9, and their median is 3.
a(12) = 7 since the divisors of 12 are 1, 2, 3, 4, 6, 12, and their median is 7/2.
MATHEMATICA
a[n_]:=Numerator[Median[Divisors[n]]]; Array[a, 75]
PROG
(PARI) a(n) = my(d=divisors(n), m=#d+1); numerator((d[m\2] + d[m-m\2])/2); \\ Michel Marcus, Mar 16 2023
CROSSREFS
KEYWORD
nonn,frac
AUTHOR
Stefano Spezia, Mar 15 2023
STATUS
approved