OFFSET
2,1
LINKS
Giuseppe Coppoletta, Table of n, a(n) for n = 2..10000
EXAMPLE
a(66) = 3 because the median of [2, 3, 11] is the central value 3 (and it is prime).
a(308) = 3 because the median of [2, 2, 7, 11] is (2+7)/2 = 4.5 and the previous prime is 3.
MATHEMATICA
Table[Prime@ PrimePi@ Median@ Flatten@ Apply[Table[#1, {#2}] &, FactorInteger@ n, 1], {n, 2, 82}] (* Michael De Vlieger, May 27 2016 *)
PROG
(Sage) r = lambda n: [f[0] for f in factor(n) for _ in range(f[1])]; [previous_prime(floor(median(r(n)))+1) for n in (2..100)]
CROSSREFS
KEYWORD
nonn
AUTHOR
Giuseppe Coppoletta, May 25 2016
STATUS
approved