login
A352519
Numbers of the form prime(p)^q where p and q are primes. Prime powers whose prime index and exponent are both prime.
4
9, 25, 27, 121, 125, 243, 289, 961, 1331, 1681, 2187, 3125, 3481, 4489, 4913, 6889, 11881, 16129, 24649, 29791, 32041, 36481, 44521, 58081, 68921, 76729, 78125, 80089, 109561, 124609, 134689, 160801, 161051, 177147, 185761, 205379, 212521, 259081, 299209
OFFSET
1,1
COMMENTS
Alternatively, numbers of the form prime(prime(i))^prime(j) for some positive integers i, j.
LINKS
EXAMPLE
The terms together with their prime indices begin:
9: {2,2}
25: {3,3}
27: {2,2,2}
121: {5,5}
125: {3,3,3}
243: {2,2,2,2,2}
289: {7,7}
961: {11,11}
1331: {5,5,5}
1681: {13,13}
2187: {2,2,2,2,2,2,2}
3125: {3,3,3,3,3}
3481: {17,17}
4489: {19,19}
4913: {7,7,7}
6889: {23,23}
11881: {29,29}
16129: {31,31}
24649: {37,37}
29791: {11,11,11}
MAPLE
N:= 10^7: # for terms <= N
M:=numtheory:-pi(numtheory:-pi(isqrt(N))):
PP:= {seq(ithprime(ithprime(i)), i=1..M)}:
R:= NULL:
for p in PP do
q:= 1:
do
q:= nextprime(q);
t:= p^q;
if t > N then break fi;
R:= R, t;
od;
od:
sort([R]); # Robert Israel, Dec 08 2022
MATHEMATICA
Select[Range[10000], PrimePowerQ[#]&&MatchQ[FactorInteger[#], {{_?(PrimeQ[PrimePi[#]]&), k_?PrimeQ}}]&]
PROG
(Python)
from sympy import primepi, integer_nthroot, primerange
def A352519(n):
def f(x): return int(n+x-sum(primepi(primepi(integer_nthroot(x, p)[0])) 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
Numbers of the form p^q for p and q prime are A053810, counted by A001221.
These partitions are counted by A230595.
This is the prime power case of A346068.
For numbers that are not a prime power we have A352518, counted by A352493.
A000040 lists the primes.
A000961 lists prime powers.
A001597 lists perfect powers.
A001694 lists powerful numbers, counted by A007690.
A056166 = prime exponents are all prime, counted by A055923.
A076610 = prime indices are all prime, counted by A000607, powerful A339218.
A109297 = same indices as exponents, counted by A114640.
A112798 lists prime indices, reverse A296150, sum A056239.
A124010 gives prime signature, sorted A118914, sum A001222.
A164336 lists all possible power-towers of prime numbers.
A257994 counts prime indices that are themselves prime, nonprime A330944.
A325131 = disjoint indices from exponents, counted by A114639.
Sequence in context: A074852 A322177 A346068 * A321874 A020252 A076486
KEYWORD
nonn
AUTHOR
Gus Wiseman, Mar 26 2022
STATUS
approved