%I #24 Jun 02 2013 14:29:44
%S 16,24,30,420,50820,60060,7147140,87297210,9369900540,103515091680,
%T 11030826957150,126152548291770,13387011595197240,143910374648370330,
%U 15372244564712285250,162945792385950223650,17304843151387913751630,1876614101750511535732320
%N The smallest number beginning with n whose distinct prime factors are the first n primes.
%C a(3)=30 is the only term with fewer than 1000 digits whose superscripts are all 1.
%C Though counterexamples are possible, it appears that the sequence is strictly increasing (confirmed for n < 350, and counterexamples are increasingly unlikely statistically thereafter).
%H Christian N. K. Anderson, <a href="/A225903/b225903.txt">Table of n, a(n) for n = 1..349</a>
%H Christian N. K. Anderson, <a href="/A225903/a225903_1.txt">Table of n, the first digits of a(n), the number of digits of a(n), and all factors of a(n) whose superscript is >1</a>
%e For a(6), the number 60060 = 2^2 * 3 * 5 * 7 * 11 * 13. The only number smaller whose factors contains the first 6 primes is 30030, which does not begin with 6.
%t a[n_] := Block[{p = Prime[n], ba = Product[Prime@k, {k, n}], d = IntegerDigits@ n, mu = 1}, While[d != Take[IntegerDigits[mu*ba], Length@d] || Max[ First /@ FactorInteger[mu]] > p, mu++]; mu*ba]; Array[a, 20] (* _Giovanni Resta_, May 27 2013 *)
%o (R)
%o library(gmp); primes<-function(n) { x=as.bigz(rep(2,n)); for(i in 2:n) x[i]=nextprime(x[i-1]); as.vector(x[1:n]) }
%o newmin<-function(b,d) { if(d>length(b)) return();
%o while(1) { b[d]=b[d]+1; if((x=prod(pr^b))>v) return()
%o if(substr(x,1,ndig(i))==as.character(i)) { v<<-x; return() }
%o if(b[d]==2) {b[d]=1; newmin(b,d+1); b[d]=2 }
%o newmin(b,d+1)
%o }
%o }
%o y=as.bigz(rep(0,50))
%o for(i in 1:50) {
%o pr=primes(i); b=rep(1,i)
%o while(substr((v=prod(pr^b)),1,ndig(i))!=as.character(i)) b[1]=b[1]+1;
%o while(b[1]>1) { b[1]=b[1]-1; newmin(b,2) }
%o if(y[i]>v) y[i]=v;
%o }
%Y Cf. A000040, A002110.
%Y Cf. A086558, A109864, A088104
%Y Cf. A018802, A077515, A077727
%K nonn,base
%O 1,1
%A _Kevin L. Schwartz_ and _Christian N. K. Anderson_, May 21 2013