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.

A350352 Products of three or more distinct prime numbers.

This page as a plain text file.
%I A350352 #22 Sep 11 2024 22:49:00
%S A350352 30,42,66,70,78,102,105,110,114,130,138,154,165,170,174,182,186,190,
%T A350352 195,210,222,230,231,238,246,255,258,266,273,282,285,286,290,310,318,
%U A350352 322,330,345,354,357,366,370,374,385,390,399,402,406,410,418,426,429,430
%N A350352 Products of three or more distinct prime numbers.
%C A350352 First differs from A336568 in lacking 420.
%H A350352 Michael De Vlieger, <a href="/A350352/b350352.txt">Table of n, a(n) for n = 1..10000</a>
%e A350352 The terms and their prime indices begin:
%e A350352      30: {1,2,3}     182: {1,4,6}      285: {2,3,8}
%e A350352      42: {1,2,4}     186: {1,2,11}     286: {1,5,6}
%e A350352      66: {1,2,5}     190: {1,3,8}      290: {1,3,10}
%e A350352      70: {1,3,4}     195: {2,3,6}      310: {1,3,11}
%e A350352      78: {1,2,6}     210: {1,2,3,4}    318: {1,2,16}
%e A350352     102: {1,2,7}     222: {1,2,12}     322: {1,4,9}
%e A350352     105: {2,3,4}     230: {1,3,9}      330: {1,2,3,5}
%e A350352     110: {1,3,5}     231: {2,4,5}      345: {2,3,9}
%e A350352     114: {1,2,8}     238: {1,4,7}      354: {1,2,17}
%e A350352     130: {1,3,6}     246: {1,2,13}     357: {2,4,7}
%e A350352     138: {1,2,9}     255: {2,3,7}      366: {1,2,18}
%e A350352     154: {1,4,5}     258: {1,2,14}     370: {1,3,12}
%e A350352     165: {2,3,5}     266: {1,4,8}      374: {1,5,7}
%e A350352     170: {1,3,7}     273: {2,4,6}      385: {3,4,5}
%e A350352     174: {1,2,10}    282: {1,2,15}     390: {1,2,3,6}
%t A350352 Select[Range[100],SquareFreeQ[#]&&PrimeOmega[#]>=3&]
%o A350352 (Python)
%o A350352 from sympy import factorint
%o A350352 def ok(n): f = factorint(n, multiple=True); return len(f) == len(set(f)) > 2
%o A350352 print([k for k in range(431) if ok(k)]) # _Michael S. Branicky_, Jan 14 2022
%o A350352 (Python)
%o A350352 from math import isqrt, prod
%o A350352 from sympy import primerange, integer_nthroot, primepi
%o A350352 def A350352(n):
%o A350352     def g(x,a,b,c,m): yield from (((d,) for d in enumerate(primerange(b+1,isqrt(x//c)+1),a+1)) if m==2 else (((a2,b2),)+d for a2,b2 in enumerate(primerange(b+1,integer_nthroot(x//c,m)[0]+1),a+1) for d in g(x,a2,b2,c*b2,m-1)))
%o A350352     def f(x): return int(n+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(3,x.bit_length())))
%o A350352     def bisection(f,kmin=0,kmax=1):
%o A350352         while f(kmax) > kmax: kmax <<= 1
%o A350352         while kmax-kmin > 1:
%o A350352             kmid = kmax+kmin>>1
%o A350352             if f(kmid) <= kmid:
%o A350352                 kmax = kmid
%o A350352             else:
%o A350352                 kmin = kmid
%o A350352         return kmax
%o A350352     return bisection(f,n,n) # _Chai Wah Wu_, Sep 11 2024
%o A350352 (PARI) is(n,f=factor(n))=my(e=f[,2]); #e>2 && vecmax(e)==1 \\ _Charles R Greathouse IV_, Jul 08 2022
%o A350352 (PARI) list(lim)=my(v=List()); forsquarefree(n=30,lim\1, if(#n[2][,2]>2, listput(v,n[1]))); Vec(v) \\ _Charles R Greathouse IV_, Jul 08 2022
%Y A350352 This is the squarefree case of A033942.
%Y A350352 Including squarefree semiprimes gives A120944.
%Y A350352 The squarefree complement consists of 1 and A167171.
%Y A350352 These are the Heinz numbers of the partitions counted by A347548.
%Y A350352 A000040 lists prime numbers (exactly 1 prime factor).
%Y A350352 A005117 lists squarefree numbers.
%Y A350352 A006881 lists squarefree numbers with exactly 2 prime factors.
%Y A350352 A007304 lists squarefree numbers with exactly 3 prime factors.
%Y A350352 A046386 lists squarefree numbers with exactly 4 prime factors.
%Y A350352 Cf. A000009, A000111, A001250, A002808, A027383, A349796.
%K A350352 nonn
%O A350352 1,1
%A A350352 _Gus Wiseman_, Jan 11 2022