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.

This page as a plain text file.
%I A382022 #43 Apr 22 2025 06:32:28
%S A382022 70,105,110,154,182,231,238,266,273,286,322,374,418,429,442,494,506,
%T A382022 561,598,627,638,646,663,682,715,741,754,759,782,806,814,874,897,902,
%U A382022 935,946,957,962,969,986,1001,1023,1034,1045,1054,1066,1102,1105,1118
%N A382022 Composite integers k = p*q*r where p < q < r are distinct primes such that p*r < q^2.
%C A382022 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.
%H A382022 Chai Wah Wu, <a href="/A382022/b382022.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1776 from Matthew Goers)
%H A382022 Matthew Goers, <a href="/A382022/a382022.txt">Factors of Terms</a>
%e A382022 70 = 2*5*7 and 2*7 < 5^2, so 70 is in the sequence.
%e A382022 105 = 3*5*7 and 3*7 < 5^2, so 105 is in the sequence.
%e A382022 165 = 3*5*11 but 3*11 > 5^2, so 165 is not in the sequence.
%t A382022 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 *)
%o A382022 (Python)
%o A382022 from math import isqrt
%o A382022 from sympy import primepi, primerange, integer_nthroot
%o A382022 def A382022(n):
%o A382022     def bisection(f,kmin=0,kmax=1):
%o A382022         while f(kmax) > kmax: kmax <<= 1
%o A382022         kmin = kmax >> 1
%o A382022         while kmax-kmin > 1:
%o A382022             kmid = kmax+kmin>>1
%o A382022             if f(kmid) <= kmid:
%o A382022                 kmax = kmid
%o A382022             else:
%o A382022                 kmin = kmid
%o A382022         return kmax
%o A382022     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))
%o A382022     return bisection(f,n,n) # _Chai Wah Wu_, Mar 28 2025
%Y A382022 Subsequence of A007304 (sphenic numbers).
%Y A382022 Supersequence of A375008 (consecutive primes p, q, r).
%Y A382022 Cf. A381736.
%K A382022 nonn
%O A382022 1,1
%A A382022 _Matthew Goers_, Mar 12 2025