OFFSET
1,1
COMMENTS
FORMULA
a(n) = n + o(sqrt n). - Charles R Greathouse IV, Oct 19 2015
MATHEMATICA
With[{nn=100}, Union[Join[Prime[Range[PrimePi[nn]]], DeleteCases[Range[2, 80], _?(PrimePowerQ[#]&)]]]] (* Harvey P. Dale, May 15 2019 *)
PROG
(PARI) is(n)=isprimepower(n)<2 && n>1 \\ Charles R Greathouse IV, Oct 19 2015
(Python)
from sympy import primepi, integer_nthroot
def A085971(n):
def f(x): return int(n+sum(primepi(integer_nthroot(x, k)[0]) for k in range(2, x.bit_length())))
kmin, kmax = 1, 2
while f(kmax) >= kmax:
kmax <<= 1
while True:
kmid = kmax+kmin>>1
if f(kmid) < kmid:
kmax = kmid
else:
kmin = kmid
if kmax-kmin <= 1:
break
return kmax # Chai Wah Wu, Aug 20 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Jul 06 2003
STATUS
approved