login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A217908
Semiprime powers of distinct semiprimes.
1
1296, 4096, 6561, 10000, 38416, 50625, 194481, 234256, 262144, 390625, 456976, 531441, 1000000, 1048576, 1185921, 1336336, 1500625, 2085136, 2313441, 4477456, 5764801, 6765201, 7529536, 9150625, 10077696, 10556001, 11316496, 11390625, 14776336, 17850625
OFFSET
1,1
COMMENTS
Subset of A113877.
LINKS
Christian N. K. Anderson, Table of n, a(n) for n = 1..9006, for a(n) < 1.5*10^18
EXAMPLE
6561=9^4, and 9 and 4 are both semiprime. 46656 = 6^6 is excluded because the semiprimes are not distinct.
PROG
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot, factorint
def A217908(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])-(p**p<=x) 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
Cf. A113877.
Sequence in context: A281399 A043372 A372841 * A223508 A250810 A378900
KEYWORD
nonn
STATUS
approved