[go: up one dir, main page]

login
A046323
Odd numbers divisible by exactly 10 primes (counted with multiplicity).
2
59049, 98415, 137781, 164025, 216513, 229635, 255879, 273375, 321489, 334611, 360855, 373977, 382725, 426465, 452709, 455625, 505197, 535815, 557685, 570807, 597051, 601425, 610173, 623295, 637875, 710775, 728271, 750141, 754515, 759375
OFFSET
1,1
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
Cf. A046314.
Sequence in context: A176763 A176769 A255893 * A368950 A017081 A017165
KEYWORD
nonn
AUTHOR
Patrick De Geest, Jun 15 1998
STATUS
approved