OFFSET
1,1
PROG
(PARI) lista(nn) = for(k=1, nn, if(isprime(isprimepower(k, &p)), print1(bigomega(k)^p, ", "))); \\ Jinyuan Wang, Feb 25 2020
(Python)
from math import prod
from sympy import primepi, integer_nthroot, primerange, factorint
def A145521(n):
def f(x): return int(n-1+x-sum(primepi(integer_nthroot(x, p)[0]) for p in primerange(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 prod(e**p for p, e in factorint(kmax).items()) # Chai Wah Wu, Aug 13 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Oct 12 2008
EXTENSIONS
Extended by Ray Chandler, Nov 01 2008
More terms from Jinyuan Wang, Feb 25 2020
STATUS
approved