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.

A382022 Composite integers k = p*q*r where p < q < r are distinct primes such that p*r < q^2.

Original entry on oeis.org

70, 105, 110, 154, 182, 231, 238, 266, 273, 286, 322, 374, 418, 429, 442, 494, 506, 561, 598, 627, 638, 646, 663, 682, 715, 741, 754, 759, 782, 806, 814, 874, 897, 902, 935, 946, 957, 962, 969, 986, 1001, 1023, 1034, 1045, 1054, 1066, 1102, 1105, 1118
Offset: 1

Views

Author

Matthew Goers, Mar 12 2025

Keywords

Comments

These are squarefree, 3-almost primes, called sphenic numbers, that are less than the cube of the middle prime factor. If k = p*q*r and p < q < r, it is always true that p^3 < k < r^3. This sequence includes the terms where k < q^3.

Examples

			70 = 2*5*7 and 2*7 < 5^2, so 70 is in the sequence.
105 = 3*5*7 and 3*7 < 5^2, so 105 is in the sequence.
165 = 3*5*11 but 3*11 > 5^2, so 165 is not in the sequence.
		

Crossrefs

Subsequence of A007304 (sphenic numbers).
Supersequence of A375008 (consecutive primes p, q, r).
Cf. A381736.

Programs

  • Mathematica
    q[n_] := Module[{f = FactorInteger[n]}, f[[;; , 2]] == {1, 1, 1} && f[[1, 1]] * f[[3, 1]] < f[[2, 1]]^2]; Select[Range[1200], q] (* Amiram Eldar, Mar 12 2025 *)
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A382022(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(primepi(min(x//(p*q),q**2//p))-b for a,p in enumerate(primerange(integer_nthroot(x,3)[0]+1),1) for b,q in enumerate(primerange(p+1,isqrt(x//p)+1),a+1))
        return bisection(f,n,n) # Chai Wah Wu, Mar 28 2025