cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A046323 Odd numbers divisible by exactly 10 primes (counted with multiplicity).

Original entry on oeis.org

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

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Crossrefs

Cf. A046314.

Programs

  • Mathematica
    Select[Range[9,800001,2],PrimeOmega[#]==10&] (* Harvey P. Dale, May 26 2013 *)
  • 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