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.

A046386 Products of exactly four distinct primes.

Original entry on oeis.org

210, 330, 390, 462, 510, 546, 570, 690, 714, 770, 798, 858, 870, 910, 930, 966, 1110, 1122, 1155, 1190, 1218, 1230, 1254, 1290, 1302, 1326, 1330, 1365, 1410, 1430, 1482, 1518, 1554, 1590, 1610, 1722, 1770, 1785, 1794, 1806, 1830, 1870, 1914, 1938, 1974
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Comments

A squarefree subsequence of A033993. Numbers like 420 = 2^2*3*5*7 with at least one prime exponent greater than 1 in the prime signature are excluded here. - R. J. Mathar, Apr 03 2011
Numbers such that omega(n) = bigomega(n) = 4. - Michel Marcus, Dec 15 2015

Examples

			210 = 2*3*5*7;
330 = 2*3*5*11;
390 = 2*3*5*13;
462 = 2*3*7*11.
		

Crossrefs

Products of exactly k distinct primes, for k = 1 to 6: A000040, A006881. A007304, A046386, A046387, A067885.
Cf. A001221 (omega), A001222 (bigomega), A014613 (bigomega(N) = 4) and A033993 (omega(N) = 4).
Cf. A046402 (4 palindromic prime factors).

Programs

  • Mathematica
    fQ[n_] := Last /@ FactorInteger[n] == {1, 1, 1, 1}; Select[ Range[2000], fQ[ # ] &] (* Robert G. Wilson v, Aug 04 2005 *)
    Select[Range[2000],PrimeNu[#]==PrimeOmega[#]==4&] (* Harvey P. Dale, Jan 05 2025 *)
  • PARI
    is(n)=factor(n)[,2]==[1,1,1,1]~ \\ Charles R Greathouse IV, Sep 17 2015
    
  • PARI
    is(n) = omega(n)==4 && bigomega(n)==4 \\ Hugo Pfoertner, Dec 18 2018
    
  • PARI
    list(lim)=my(v=List()); forprime(p=2,sqrtnint(lim\=1,4), forprime(q=p+1,sqrtnint(lim\p,3), forprime(r=q+2,sqrtint(lim\p\q), my(t=p*q*r); forprime(s=r+2,lim\t, listput(v,t*s))))); Set(v) \\ Charles R Greathouse IV, Dec 05 2024
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A046386(n):
        def f(x): return int(n+x-sum(primepi(x//(k*m*r))-c for a,k in enumerate(primerange(integer_nthroot(x,4)[0]+1),1) for b,m in enumerate(primerange(k+1,integer_nthroot(x//k,3)[0]+1),a+1) for c,r in enumerate(primerange(m+1,isqrt(x//(k*m))+1),b+1)))
        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 29 2024

Formula

Intersection of A014613 (product of 4 primes) and A033993 (divisible by 4 distinct primes). - M. F. Hasler, Mar 24 2022