# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a106423 Showing 1-1 of 1 %I A106423 #11 Sep 12 2024 19:57:45 %S A106423 3,33,30,36,32,324,320,384,3200,3456,3072,31104,30720,36864,32768, %T A106423 331776,327680,393216,3276800,3538944,3145728,31850496,31457280, %U A106423 37748736,33554432,339738624,301989888,3057647616,3019898880,3623878656 %N A106423 Smallest number beginning with 3 and having exactly n prime divisors counted with multiplicity. %H A106423 Robert Israel, Table of n, a(n) for n = 1..3303 %e A106423 a(1) = 3, a(6) = 324 = 2^2*3^4. %p A106423 f:= proc(n) uses priqueue; local pq, t,p,x,i; %p A106423 initialize(pq); %p A106423 insert([-2^n,2$n],pq); %p A106423 do %p A106423 t:= extract(pq); %p A106423 x:= -t[1]; %p A106423 if floor(x/10^ilog10(x)) = 3 then return x fi; %p A106423 p:= nextprime(t[-1]); %p A106423 for i from n+1 to 2 by -1 while t[i] = t[-1] do %p A106423 insert([t[1]*(p/t[-1])^(n+2-i), op(t[2..i-1]),p$(n+2-i)],pq) %p A106423 od; %p A106423 od %p A106423 end proc: %p A106423 map(f, [$1..50]); # _Robert Israel_, Sep 06 2024 %o A106423 (Python) %o A106423 from itertools import count %o A106423 from math import isqrt, prod %o A106423 from sympy import primerange, integer_nthroot, primepi %o A106423 def A106423(n): %o A106423 if n == 1: return 3 %o A106423 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 A106423 def f(x): return int(sum(primepi(x//prod(c[1] for c in a))-a[-1][0] for a in g(x,0,1,1,n))) %o A106423 for l in count(len(str(1<mmin: %o A106423 while kmax-kmin > 1: %o A106423 kmid = kmax+kmin>>1 %o A106423 mmid = f(kmid) %o A106423 if mmid > mmin: %o A106423 kmax, mmax = kmid, mmid %o A106423 else: %o A106423 kmin, mmin = kmid, mmid %o A106423 return kmax # _Chai Wah Wu_, Sep 12 2024 %Y A106423 Cf. A077326-A077334, A106411-A106419, A106421-A106429. %K A106423 base,nonn %O A106423 1,1 %A A106423 _Ray Chandler_, May 02 2005 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE