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.

A123073 Number of ordered triples of primes (p,q,r) such that pqr = n-th 3-almost prime A014612(n).

Original entry on oeis.org

1, 3, 3, 3, 1, 3, 6, 6, 3, 3, 3, 3, 3, 6, 3, 6, 3, 3, 6, 3, 3, 3, 6, 6, 6, 6, 3, 3, 3, 1, 6, 6, 3, 3, 3, 6, 3, 6, 6, 3, 3, 6, 3, 6, 6, 3, 6, 6, 3, 3, 6, 6, 6, 3, 6, 3, 3, 3, 6, 6, 6, 3, 6, 3, 6, 3, 3, 6, 3, 6, 6, 6, 3, 6, 3, 6, 6, 3, 3, 3, 3, 1, 6, 6, 3, 6, 3, 6, 3, 6, 6, 6, 3, 3, 6, 6, 3, 6, 6, 3, 6, 3, 3, 6, 3
Offset: 1

Views

Author

N. J. A. Sloane and T. D. Noe, Sep 29 2006

Keywords

Comments

The nonzero subsequence of A123074.

Crossrefs

Programs

  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot, primefactors
    def A123073(n):
        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
        def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(integer_nthroot(x,3)[0]+1)) for b,m in enumerate(primerange(k,isqrt(x//k)+1),a)))
        return (1,3,6)[len(primefactors(bisection(f,n,n)))-1] # Chai Wah Wu, Oct 20 2024

Extensions

More terms from T. D. Noe, Sep 29 2006