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.

A037144 Numbers with at most 3 prime factors (counted with multiplicity).

This page as a plain text file.
%I A037144 #22 Jul 08 2025 22:02:46
%S A037144 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20,21,22,23,25,26,27,28,
%T A037144 29,30,31,33,34,35,37,38,39,41,42,43,44,45,46,47,49,50,51,52,53,55,57,
%U A037144 58,59,61,62,63,65,66,67,68,69,70,71,73,74,75,76,77,78,79,82,83,85,86
%N A037144 Numbers with at most 3 prime factors (counted with multiplicity).
%C A037144 Complement of A033987: A001222(a(n))<=3; A117358(a(n))=1. - _Reinhard Zumkeller_, Mar 10 2006
%C A037144 Also numbers such that exist permutations of all proper divisors only with coprime adjacent elements: A178254(a(n))>0. - _Reinhard Zumkeller_, May 24 2010
%H A037144 Klaus Brockhaus, <a href="/A037144/b037144.txt">Table of n, a(n) for n = 1..10000</a>
%F A037144 a(n) ~ 2n log n/(log log n)^2. - _Charles R Greathouse IV_, Sep 14 2015
%t A037144 Select[Range[100],PrimeOmega[#]<4&] (* _Harvey P. Dale_, Oct 15 2015 *)
%o A037144 (Magma) [ n: n in [1..86] | n eq 1 or &+[ t[2]: t in Factorization(n) ] le 3 ]; /* Klaus Brockhaus, Mar 20 2007 */
%o A037144 (PARI) is(n)=bigomega(n)<4 \\ _Charles R Greathouse IV_, Sep 14 2015
%o A037144 (Python)
%o A037144 from math import prod, isqrt
%o A037144 from sympy import primerange, integer_nthroot, primepi
%o A037144 def A037144(n):
%o A037144     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 A037144     def f(x): return int(n+x-2-primepi(x)-sum(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,i)) for i in range(2,4)))
%o A037144     kmin, kmax = 1,2
%o A037144     while f(kmax) >= kmax:
%o A037144         kmax <<= 1
%o A037144     while True:
%o A037144         kmid = kmax+kmin>>1
%o A037144         if f(kmid) < kmid:
%o A037144             kmax = kmid
%o A037144         else:
%o A037144             kmin = kmid
%o A037144         if kmax-kmin <= 1:
%o A037144             break
%o A037144     return kmax # _Chai Wah Wu_, Aug 23 2024
%Y A037144 A037143 is a subsequence.
%Y A037144 Cf. A033987, A001222, A117358, A128644.
%K A037144 nonn
%O A037144 1,2
%A A037144 _N. J. A. Sloane_
%E A037144 More terms from _Reinhard Zumkeller_, Mar 10 2006
%E A037144 More terms from _Klaus Brockhaus_, Mar 20 2007