OFFSET
1,1
LINKS
John Cerkan, Table of n, a(n) for n = 1..10000
MATHEMATICA
Select[Range[9, 800001, 2], PrimeOmega[#]==10&] (* Harvey P. Dale, May 26 2013 *)
PROG
(Python)
from math import isqrt, prod
from sympy import primerange, integer_nthroot, primepi
def A046323(n):
def g(x, a, b, c, m): yield from (((d, ) for d in enumerate(primerange(b, isqrt(x//c)+1), a)) if m==2 else (((a2, b2), )+d for a2, b2 in enumerate(primerange(b, integer_nthroot(x//c, m)[0]+1), a) 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, 1, 3, 1, 10)))
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 09 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Patrick De Geest, Jun 15 1998
STATUS
approved