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.

A189975 Numbers with prime factorization pqr^3 for distinct p, q, r.

Original entry on oeis.org

120, 168, 264, 270, 280, 312, 378, 408, 440, 456, 520, 552, 594, 616, 680, 696, 702, 728, 744, 750, 760, 888, 918, 920, 945, 952, 984, 1026, 1032, 1064, 1128, 1144, 1160, 1240, 1242, 1272, 1288, 1416, 1464, 1480, 1485, 1496, 1566, 1608, 1624, 1640, 1672
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_]:=Sort[Last/@FactorInteger[n]]=={1,1,3}; Select[Range[2000],f]
  • PARI
    list(lim)=my(v=List(),t);forprime(p=2,(lim\6)^(1/3),forprime(q=2,sqrt(lim\p^3),if(p==q,next);t=p^3*q;forprime(r=q+1,lim\t,if(p==r,next);listput(v,t*r))));vecsort(Vec(v)) \\ Charles R Greathouse IV, Jul 19 2011
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A189975(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = 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 n+x+sum((t:=primepi(s:=isqrt(y:=x//r**3)))+(t*(t-1)>>1)-sum(primepi(y//k) for k in primerange(1, s+1)) for r in primerange(integer_nthroot(x,3)[0]+1))+sum(primepi(x//p**4) for p in primerange(integer_nthroot(x,4)[0]+1))-primepi(integer_nthroot(x,5)[0])
        return bisection(f,n,n) # Chai Wah Wu, Mar 27 2025