[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
login
A361565
a(n) is the numerator of the median of divisors of n.
4
1, 3, 2, 2, 3, 5, 4, 3, 3, 7, 6, 7, 7, 9, 4, 4, 9, 9, 10, 9, 5, 13, 12, 5, 5, 15, 6, 11, 15, 11, 16, 6, 7, 19, 6, 6, 19, 21, 8, 13, 21, 13, 22, 15, 7, 25, 24, 7, 7, 15, 10, 17, 27, 15, 8, 15, 11, 31, 30, 8, 31, 33, 8, 8, 9, 17, 34, 21, 13, 17, 36, 17, 37, 39, 10
OFFSET
1,2
FORMULA
a(n) = numerator((A033676(n) + A033677(n))/2).
a(p) = (1 + p)/2 if p is an odd prime.
For p a prime, a(p^k) = (p^((k-1)/2) + p^((k+1)/2))/2 if k is odd, a(p^k) = p^(k/2) if k is even.
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
Sequence in context: A222666 A335401 A324465 * A334592 A248756 A059942
KEYWORD
nonn,frac
AUTHOR
Stefano Spezia, Mar 15 2023
STATUS
approved