login
A243196
Number of primorial numbers < 10^n.
0
3, 4, 5, 6, 7, 8, 9, 9, 10, 11, 11, 12, 13, 13, 14, 14, 15, 16, 16, 17, 17, 18, 18, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30, 31, 31, 32, 32, 33, 33, 34, 34, 34, 35, 35, 36, 36, 37, 37, 38, 38, 39, 39, 40, 40, 40, 41, 41, 42, 42, 43
OFFSET
1,1
EXAMPLE
There are 5 primorial numbers < 10^3: 1, 2, 6, 30 and 210. Thus a(3) = 5.
PROG
(PARI) hashp(n)=prod(i=1, n, prime(i))
a(n)={tot=1; for(k=1, 10^n, if(hashp(k)<10^n, tot++); if(hashp(k)>10^n, break)); return(tot)}
n=1; while(n<100, print1(a(n), ", "); n++)
(PARI) {a(n) = my(p=1, m=10^n); for(k=1, n+3, if(m <= (p *= prime(k)), return(k)))}; /* Michael Somos, Jun 02 2014 */
CROSSREFS
Cf. A002110.
Sequence in context: A248631 A176407 A077396 * A247485 A154781 A118716
KEYWORD
nonn
AUTHOR
Derek Orr, Jun 01 2014
STATUS
approved