login
A186637
Semiprime powers with special exponents: k^(j-1) where both j and k are arbitrary semiprime numbers.
1
64, 216, 729, 1000, 1024, 2744, 3375, 7776, 9261, 10648, 15625, 17576, 35937, 39304, 42875, 54872, 59049, 59319, 65536, 97336, 100000, 117649, 132651, 166375, 185193, 195112, 238328, 262144, 274625, 328509, 405224, 456533, 537824, 551368, 614125, 636056, 658503, 753571, 759375, 804357, 830584, 857375
OFFSET
1,1
COMMENTS
Semiprime analog of A036454: prime powers with special exponents: q^(p-1) where both p and q are arbitrary prime numbers.
FORMULA
{a(n)} = {A001358(i) ^ A186621(j)}.
{a(n)} = {a^b where a and b are elements of A001358} = {(p*q)^((r*s)-1) for primes p, q, r, s, not necessarily distinct}.
EXAMPLE
a(1) = smallest semiprime to power of (smallest semiprime - 1) = 4^(4-1) = 4^3 = 64.
PROG
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot, factorint
def A186637(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-1)[0]) for p in range(4, x.bit_length()+1) 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
nonn,easy
AUTHOR
Jonathan Vos Post, Feb 24 2011
STATUS
approved