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.

A046387 Products of exactly 5 distinct primes.

This page as a plain text file.
%I A046387 #36 Aug 31 2024 01:57:33
%S A046387 2310,2730,3570,3990,4290,4830,5610,6006,6090,6270,6510,6630,7410,
%T A046387 7590,7770,7854,8610,8778,8970,9030,9282,9570,9690,9870,10010,10230,
%U A046387 10374,10626,11130,11310,11730,12090,12210,12390,12558,12810,13090,13110
%N A046387 Products of exactly 5 distinct primes.
%C A046387 Subsequence of A051270. 4620 = 2^2*3*5*7*11 is in A051270 but not in here, for example. - _R. J. Mathar_, Nov 10 2014
%H A046387 T. D. Noe, <a href="/A046387/b046387.txt">Table of n, a(n) for n = 1..10000</a>
%e A046387 a(1) = 2310 = 2 * 3 * 5 * 7 * 11 = A002110(5) = 5#.
%e A046387 a(2) = 2730 = 2 * 3 * 5 * 7 * 13.
%e A046387 a(3) = 3570 = 2 * 3 * 5 * 7 * 17.
%e A046387 a(10) = 6006 = 2 * 3 * 7 * 11 * 13.
%p A046387 A046387 := proc(n)
%p A046387     option remember;
%p A046387     local a;
%p A046387     if n = 1 then
%p A046387         2*3*5*7*11 ;
%p A046387     else
%p A046387         for a from procname(n-1)+1 do
%p A046387             if A001221(a)= 5 and issqrfree(a) then
%p A046387                 return a;
%p A046387             end if;
%p A046387         end do:
%p A046387     end if;
%p A046387 end proc: # _R. J. Mathar_, Oct 13 2019
%t A046387 f5Q[n_]:=Last/@FactorInteger[n]=={1, 1, 1, 1, 1}; lst={};Do[If[f5Q[n], AppendTo[lst, n]], {n, 8!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Aug 26 2008 *)
%o A046387 (PARI) is(n)=factor(n)[,2]==[1,1,1,1,1]~ \\ _Charles R Greathouse IV_, Sep 17 2015
%o A046387 (PARI) is(n)= omega(n)==5 && bigomega(n)==5 \\ _Hugo Pfoertner_, Dec 18 2018
%o A046387 (Python)
%o A046387 from math import isqrt, prod
%o A046387 from sympy import primerange, integer_nthroot, primepi
%o A046387 def A046387(n):
%o A046387     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 A046387     def f(x): return int(n+x-sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,5)))
%o A046387     def bisection(f,kmin=0,kmax=1):
%o A046387         while f(kmax) > kmax: kmax <<= 1
%o A046387         while kmax-kmin > 1:
%o A046387             kmid = kmax+kmin>>1
%o A046387             if f(kmid) <= kmid:
%o A046387                 kmax = kmid
%o A046387             else:
%o A046387                 kmin = kmid
%o A046387         return kmax
%o A046387     return bisection(f) # _Chai Wah Wu_, Aug 30 2024
%Y A046387 Products of exactly k distinct primes, for k = 1 to 6: A000040, A006881. A007304, A046386, A046387, A067885.
%Y A046387 Cf. A000040, A000961, A001221, A005117, A000977, A002110, A006881, A007304, A007774, A033992, A033993, A046386.
%Y A046387 Cf. A014614, A046403, A051270.
%K A046387 easy,nonn
%O A046387 1,1
%A A046387 _Patrick De Geest_, Jun 15 1998
%E A046387 Entry revised by _N. J. A. Sloane_, Apr 10 2006