OFFSET
1,1
COMMENTS
FORMULA
Sum_{n>=1} 1/a(n) = Sum_{p odd prime} P(p) - A051006 + 1/4 = 0.054745292329555814476..., where P(s) is the prime zeta function. - Amiram Eldar, Sep 13 2024
MATHEMATICA
With[{prs=Prime[Range[2, 30]]}, Take[Union[First[#]^Last[#]&/@ Tuples[prs, 2]], 40]] (* Harvey P. Dale, Dec 23 2011 *)
PROG
(Python)
from sympy import primepi, integer_nthroot, primerange
def A118092(n):
def f(x): return int(n+x-sum(primepi(integer_nthroot(x, p)[0])-1 for p in primerange(3, x.bit_length())))
def bisection(f, kmin=0, kmax=1):
while f(kmax) > kmax: kmax <<= 1
while kmax-kmin > 1:
kmid = kmax+kmin>>1
if f(kmid) <= kmid:
kmax = kmid
else:
kmin = kmid
return kmax
return bisection(f, n, n) # Chai Wah Wu, Sep 12 2024
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, May 11 2006
EXTENSIONS
Extended by Ray Chandler, Oct 28 2008
STATUS
approved