OFFSET
1,1
COMMENTS
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
FORMULA
a(n) ~ n log n. - Charles R Greathouse IV, Oct 19 2015
MATHEMATICA
m=400; Union[Prime[Range[PrimePi[m]]], Prime[Range[PrimePi[m^(1/2)]]]^2, Prime[Range[PrimePi[m^(1/3)]]]^3] (* Vladimir Joseph Stephan Orlovsky, Apr 11 2011 *)
With[{nn=70}, Take[Union[Flatten[{#, #^2, #^3}&/@Prime[Range[nn]]]], nn]] (* Harvey P. Dale, Oct 16 2012 *)
PROG
(PARI) is(n)=my(t=isprimepower(n)); t && t<4 \\ Charles R Greathouse IV, Oct 19 2015
(Python)
from math import isqrt
from sympy import primepi, integer_nthroot
def A087797(n):
def f(x): return n+x-primepi(x)-primepi(isqrt(x))-primepi(integer_nthroot(x, 3)[0])
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return int(m) # Chai Wah Wu, Aug 09 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Oct 10 2003
STATUS
approved