OFFSET
1,1
COMMENTS
Smallest prime p such that at least n/2 numbers up to n have no prime factors larger than p.
A246430(n) = smallest m such that a(m) = prime(n): a(A246430(n))=A000040(n). - Reinhard Zumkeller, Sep 01 2014
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Eric Naslund, The median largest prime factor and the mean of omega(n) (2012)
FORMULA
a(n) = k * n^(1/sqrt(e)) * (1 + O(1/log n)), where k = 0.7738... = A212299. See Nashlund 2012 for further references and a more precise result (Theorem 8).
MATHEMATICA
a[1]=2; a[2]=2; a[n_] := NextPrime[Median[Table[FactorInteger[k][[-1, 1]], {k, 1, n}]] + 1/2, -1]; ( Charles R Greathouse IV, Jun 12 2013 )
PROG
(PARI) a(n)=my(v=vector(n, u, u)); forprime(p=2, n+1, forstep(i=p, n, p, v[i]/=p^valuation(i, p)); if(sum(i=1, n, v[i]==1)>=n/2, return(p))) \\ Charles R Greathouse IV, Jun 12 2013
(Haskell)
a212300 n = a212300_list !! (n-1)
a212300_list = f 1 (2 : a000040_list) [1] $ tail a006530_list where
f x ps'@(_ : ps@(_ : p : _)) gpfs (q : qs) =
y : f (x + 1) (if y == p then ps else ps') (q : gpfs) qs where
y = head [z | z <- ps', length (filter (> z) gpfs) <= div x 2]
-- Reinhard Zumkeller, Sep 01 2014
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
Charles R Greathouse IV, Jul 03 2012
STATUS
approved