A217908 Semiprime powers of distinct semiprimes.
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
Keywords
Examples
6561=9^4, and 9 and 4 are both semiprime. 46656 = 6^6 is excluded because the semiprimes are not distinct.
Links
- Christian N. K. Anderson, Table of n, a(n) for n = 1..9006, for a(n) < 1.5*10^18
Crossrefs
Cf. A113877.
Programs
-
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
Comments