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.

A046389 Products of exactly three distinct odd primes.

This page as a plain text file.
%I A046389 #29 Oct 18 2024 11:43:04
%S A046389 105,165,195,231,255,273,285,345,357,385,399,429,435,455,465,483,555,
%T A046389 561,595,609,615,627,645,651,663,665,705,715,741,759,777,795,805,861,
%U A046389 885,897,903,915,935,957,969,987,1001,1005,1015,1023,1045,1065,1085
%N A046389 Products of exactly three distinct odd primes.
%C A046389 The old name was "Odd numbers with exactly 3 distinct prime factors", which is slightly ambiguous, since it might be interpreted to include 315 = 3^2*5*7. Cf. A278569. - _N. J. A. Sloane_, Nov 27 2016
%H A046389 T. D. Noe, <a href="/A046389/b046389.txt">Table of n, a(n) for n=1..1000</a>
%t A046389 f[n_] := OddQ[n] && Last/@FactorInteger[n]=={1,1,1}; lst={}; Do[If[f[n], AppendTo[lst,n]], {n, 2000}]; lst (* _Vladimir Joseph Stephan Orlovsky_, Nov 23 2009 *)
%o A046389 (PARI) list(lim)=my(v=List(), t); forprime(p=3, lim^(1/3), forprime(q=p+1, sqrt(lim\p), t=p*q; forprime(r=q+1, lim\t, listput(v, t*r)))); vecsort(Vec(v)) \\ _Charles R Greathouse IV_, Jul 26 2011
%o A046389 (Python)
%o A046389 from math import isqrt
%o A046389 from sympy import primepi, integer_nthroot, primerange
%o A046389 def A046389(n):
%o A046389     def bisection(f,kmin=0,kmax=1):
%o A046389         while f(kmax) > kmax: kmax <<= 1
%o A046389         while kmax-kmin > 1:
%o A046389             kmid = kmax+kmin>>1
%o A046389             if f(kmid) <= kmid:
%o A046389                 kmax = kmid
%o A046389             else:
%o A046389                 kmin = kmid
%o A046389         return kmax
%o A046389     def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a,k in enumerate(primerange(3,integer_nthroot(x,3)[0]+1),2) for b,m in enumerate(primerange(k+1,isqrt(x//k)+1),a+1)))
%o A046389     return bisection(f,n,n) # _Chai Wah Wu_, Sep 10 2024
%Y A046389 Cf. A046316, A046405, A007304, A278569.
%K A046389 nonn
%O A046389 1,1
%A A046389 _Patrick De Geest_, Jun 15 1998
%E A046389 Name clarified by _N. J. A. Sloane_, Nov 27 2016