A349242 Numbers N = pqrs such that |pqr - s| < |ps - qr|, where p <= q <= r <= s are the 4 prime factors of N.
40, 56, 84, 88, 104, 132, 136, 152, 156, 184, 198, 204, 220, 228, 232, 234, 248, 260, 276, 296, 297, 306, 328, 340, 342, 344, 348, 351, 372, 376, 380, 414, 424, 444, 459, 460, 472, 476, 488, 492, 510, 513, 516, 522, 532, 536, 558, 564, 568, 570, 580
Offset: 1
Keywords
Examples
The first three 4-almost primes 16 = 2^4, 24 = 2^3*3 and 36 = 2^2*3^2 are not in this sequence, because the factorization u*v with closest possible factors u and v consists of choosing both, u and v, to be semiprimes (namely, 4*4, 4*6 and 6*6). The 4-almost prime 40 = 2^3*5 is in this sequence because the factorization 40 = u*v with u = 2^3, v = 5 has closer factors (distance 8 - 5 = 3) than u = 2*2, v = 2*5 (distance 10 - 4 = 6).
Links
- Marc LeBrun, four factor fun, math-fun mailing list (available for subscribers only), Nov 10 2021
Programs
-
PARI
select( {is_A349242(n,a(u)=abs(u-n\u))=bigomega(n)==4 && a((s=factor(n)[,1])[#s])
-
Python
from itertools import chain from sympy import factorint def expand(n): return list(chain.from_iterable([[i[0] for j in range(i[1])] for i in factorint(n).items()])) def is_ok(p,q,r,s): return abs(p*q*r - s)
Gleb Ivanov, Nov 12 2021
Comments