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.
%I A046306 #42 Feb 16 2025 08:32:39 %S A046306 64,96,144,160,216,224,240,324,336,352,360,400,416,486,504,528,540, %T A046306 544,560,600,608,624,729,736,756,784,792,810,816,840,880,900,912,928, %U A046306 936,992,1000,1040,1104,1134,1176,1184,1188,1215,1224,1232,1260,1312,1320 %N A046306 Numbers that are divisible by exactly 6 primes with multiplicity. %C A046306 Also called 6-almost primes. Products of exactly 6 primes (not necessarily distinct). Any 6-almost prime can be represented in several ways as a product of two 3-almost primes A014612 and in several ways as a product of three semiprimes A001358. - _Jonathan Vos Post_, Dec 11 2004 %H A046306 T. D. Noe, <a href="/A046306/b046306.txt">Table of n, a(n) for n = 1..10000</a> %H A046306 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/AlmostPrime.html">Almost Prime</a> %F A046306 Product p_i^e_i with Sum e_i = 6. %F A046306 a(n) ~ 120n log n / (log log n)^5. - _Charles R Greathouse IV_, May 06 2013 %F A046306 a(n) = A078840(6,n). - _R. J. Mathar_, Jan 30 2019 %t A046306 Select[Range[500], Plus @@ Last /@ FactorInteger[ # ] == 6 &] (* _Vladimir Joseph Stephan Orlovsky_, Apr 23 2008 *) %t A046306 Select[Range[1400],PrimeOmega[#]==6&] (* _Harvey P. Dale_, May 21 2012 *) %o A046306 (PARI) is(n)=bigomega(n)==6 \\ _Charles R Greathouse IV_, Mar 21 2013 %o A046306 (Python) %o A046306 from math import isqrt, prod %o A046306 from sympy import primepi, primerange, integer_nthroot %o A046306 def A046306(n): %o A046306 def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b,isqrt(x//c)+1),a)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b,integer_nthroot(x//c,m)[0]+1),a) for d in g(x,a2,b2,c*b2,m-1))) %o A046306 def f(x): return int(n-1+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,6))) %o A046306 kmin, kmax = 1,2 %o A046306 while f(kmax) >= kmax: %o A046306 kmax <<= 1 %o A046306 while True: %o A046306 kmid = kmax+kmin>>1 %o A046306 if f(kmid) < kmid: %o A046306 kmax = kmid %o A046306 else: %o A046306 kmin = kmid %o A046306 if kmax-kmin <= 1: %o A046306 break %o A046306 return kmax # _Chai Wah Wu_, Aug 23 2024 %Y A046306 Cf. A046305, A120047 (number of 6-almost primes <= 10^n). %Y A046306 Cf. A101605, A101606. %Y A046306 Sequences listing r-almost primes, that is, the n such that A001222(n) = r: A000040 (r = 1), A001358 (r = 2), A014612 (r = 3), A014613 (r = 4), A014614 (r = 5), this sequence (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 A046306 nonn %O A046306 1,1 %A A046306 _Patrick De Geest_, Jun 15 1998