proposed
approved
proposed
approved
editing
proposed
return bisection(f) # Chai Wah Wu, Aug 31 2024
.... y = reduce(mul, (d for d in x))
.... if y < m:
........ A115343.append(y)
(Python)
from math import prod, isqrt
from sympy import primerange, integer_nthroot, primepi
def A115343(n):
def g(x, a, b, c, m): yield from (((d, ) for d in enumerate(primerange(b+1, isqrt(x//c)+1), a+1)) if m==2 else (((a2, b2), )+d for a2, b2 in enumerate(primerange(b+1, integer_nthroot(x//c, m)[0]+1), a+1) for d in g(x, a2, b2, c*b2, m-1)))
def f(x): return int(n+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x, 0, 1, 1, 9)))
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) # Chai Wah Wu, Aug 31 2024
approved
editing
David A. Corneth, <a href="/A115343/b115343_2.txt">Table of n, a(n) for n = 1..10000</a> (first 1045 terms from Vincenzo Librandi and Chai Wah Wu)
proposed
approved
editing
proposed
Products of 9 distinct primes; also n has exactly 9 distinct prime factors and n is squarefree.
Products of 9 distinct primes.
proposed
editing
editing
proposed