OFFSET
1,1
COMMENTS
This is the semiprime analog of A053810.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
{a(n)} = {a^b where a and b are elements of A001358}.
{a(n)} = {(p*q)^(r*s) = (p^(r*s))*(q^r*s) for distinct primes p, q, r, s} UNION {(p*q)^(p*r) = (p^(p*r))*(q^(p*r)) for distinct primes p, q, r} UNION {(p*q)^(r*r) = (p^(r^2))*(q^(r^2)) for distinct primes p, q, r} UNION {(p*q)^(p*q)= (p^(p*q))*(q^(p*q)) for distinct primes p, q} UNION {(p^2)^(p^2) = p^(2*(p^2)) for prime p}.
a(n) ~ (n log n/log log n)^4. - Charles R Greathouse IV, Jun 05 2013
EXAMPLE
a(1) = 256 = 4^4 = semiprime(1)^semiprime(1).
a(2) = 1296 = 6^4 = semiprime(2)^semiprime(1).
a(3) = 4096 = 4^6 = semiprime(1)^semiprime(2).
a(4) = 6561 = 9^4 = semiprime(3)^semiprime(1).
a(5) = 10000 = 10^4.
MATHEMATICA
lim = 10^8; s = Select[Range[lim^(1/4)], Total[Transpose[FactorInteger[#]][[2]]] == 2 &]; t = {}; j = 1; While[b = s[[j]]; i = 1; While[a = s[[i]]; e = a^b; If[e <= lim, AppendTo[t, e]]; e < lim && i < Length[s], i++]; i > 1, j++]; t = Union[t] (* T. D. Noe, Jun 05 2013 *)
PROG
(PARI) is(n)=my(b, e=ispower(n, , &b), o); if(e==0, return(0)); o=bigomega(e); (o==2 && bigomega(b)==2) || (e%2==0 && o==3 && isprime(b)) \\ Charles R Greathouse IV, Jun 05 2013
(PARI) list(lim)=my(v=List()); for(e=4, log(lim\=1+.5)\log(4), if(bigomega(e)!=2, next); for(b=4, (lim+.5)^(1/e), if(bigomega(b)==2, listput(v, b^e)))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 05 2013
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot, factorint
def A113877(n):
def A072000(n): return int(-((t:=primepi(s:=isqrt(n)))*(t-1)>>1)+sum(primepi(n//p) for p in primerange(s+1)))
def f(x): return int(n+x-sum(A072000(integer_nthroot(x, p)[0]) for p in range(4, x.bit_length()) if sum(factorint(p).values())==2))
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, Jan 27 2006
EXTENSIONS
Terms corrected by Charles R Greathouse IV, Jun 05 2013
STATUS
approved