login
Numbers that are products of 4 primes.
144

%I #60 Aug 17 2024 01:34:25

%S 16,24,36,40,54,56,60,81,84,88,90,100,104,126,132,135,136,140,150,152,

%T 156,184,189,196,198,204,210,220,225,228,232,234,248,250,260,276,294,

%U 296,297,306,308,315,328,330,340,342,344,348,350,351,364,372,375,376

%N Numbers that are products of 4 primes.

%H T. D. Noe, <a href="/A014613/b014613.txt">Table of n, a(n) for n = 1..10000</a>

%H J. H. Conway, Heiko Dietrich and E. A. O'Brien, <a href="http://www.math.auckland.ac.nz/~obrien/research/gnu.pdf">Counting groups: gnus, moas and other exotica</a>, Math. Intell., Vol. 30, No. 2, Spring 2008.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/AlmostPrime.html">Almost Prime</a>.

%F Product p_i^e_i with Sum e_i = 4.

%F a(n) ~ 6n log n / (log log n)^3. - _Charles R Greathouse IV_, May 04 2013

%F a(n) = A078840(4,n). - _R. J. Mathar_, Jan 30 2019

%t Select[Range[200], Plus @@ Last /@ FactorInteger[ # ] == 4 &] (* _Vladimir Joseph Stephan Orlovsky_, Apr 23 2008 *)

%t Select[Range[400], PrimeOmega[#] == 4&] (* _Jean-François Alcover_, Jan 17 2014 *)

%o (PARI) isA014613(n) = bigomega(n)==4 \\ _Michael B. Porter_, Dec 13 2009

%o (Python)

%o from sympy import factorint

%o def ok(n): return sum(factorint(n).values()) == 4

%o print([k for k in range(377) if ok(k)]) # _Michael S. Branicky_, Nov 19 2021

%o (Python)

%o from math import isqrt

%o from sympy import primepi, primerange, integer_nthroot

%o def A014613(n):

%o 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)) for b,m in enumerate(primerange(k,integer_nthroot(x//k,3)[0]+1),a) for c,r in enumerate(primerange(m,isqrt(x//(k*m))+1),b)))

%o m, k = n, f(n)

%o while m != k:

%o m, k = k, f(k)

%o return m # _Chai Wah Wu_, Aug 17 2024

%Y Cf. A033987, A114106 (number of 4-almost primes <= 10^n).

%Y Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r = 1), A001358 (r = 2), A014612 (r = 3), this sequence (r = 4), A014614 (r = 5), A046306 (r = 6), A046308 (r = 7), A046310 (r = 8), A046312 (r = 9), A046314 (r = 10), A069272 (r = 11), A069273 (r = 12), A069274 (r = 13), A069275 (r = 14), A069276 (r = 15), A069277 (r = 16), A069278 (r = 17), A069279 (r = 18), A069280 (r = 19), A069281 (r = 20). - _Jason Kimberley_, Oct 02 2011

%K nonn

%O 1,1

%A _Eric W. Weisstein_

%E More terms from _Patrick De Geest_, Jun 15 1998