login
A118092
Odd primes raised to odd prime powers.
1
27, 125, 243, 343, 1331, 2187, 2197, 3125, 4913, 6859, 12167, 16807, 24389, 29791, 50653, 68921, 78125, 79507, 103823, 148877, 161051, 177147, 205379, 226981, 300763, 357911, 371293, 389017, 493039, 571787, 704969, 823543, 912673, 1030301
OFFSET
1,1
COMMENTS
Subset of A053810 Prime powers of prime numbers. Subset of A000961 Prime powers. Subsets include A030078 Cubes of primes, A050997 Fifth powers of primes.
FORMULA
{p^q where p is in A065091 and q is in A065091}.
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
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, May 11 2006
EXTENSIONS
Extended by Ray Chandler, Oct 28 2008
STATUS
approved