OFFSET
1,1
LINKS
Eric Weisstein's World of Mathematics, Prime Power.
FORMULA
a(n) = p^q, where p, q are primes and p > 2.
Sum_{n>=1} 1/a(n) = Sum_{p prime} P(p) - A051006 = 0.25699271237062131298..., where P(s) is the prime zeta function. - Amiram Eldar, Sep 13 2024
EXAMPLE
9 is in the sequence because 9 = 3^2;
25 is in the sequence because 25 = 5^2;
27 is in the sequence because 27 = 3^3, etc.
MATHEMATICA
Select[Range[30000], PrimePowerQ[#1] && PrimeQ[PrimeOmega[#1]] && Mod[#1, 2] == 1 & ]
PROG
(Python)
from sympy import primepi, integer_nthroot, primerange
def A280609(n):
def f(x): return int(n+x-sum(primepi(integer_nthroot(x, p)[0])-1 for p in primerange(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
nonn,easy
AUTHOR
Ilya Gutkovskiy, Jan 06 2017
STATUS
approved