OFFSET
1,4
COMMENTS
The current zero values are only conjectural: a(n) > 5000 - n for all a(n) = 0 shown. [Edited by M. F. Hasler, Apr 27 2017]
Probably a(n) > 0 for all n. Appending k integers gives a number of size ~10^(k log_10 k) and so the expected number of primes with k < x is about the integral of 1/(k log k) up to x which is log log x. This diverges, so by the Borel-Cantelli lemma we expect that there will be a prime eventually. (Corrections for the particular base at hand affect the expected number but not its order of growth.) On the other hand, log log x grows slowly so finding the values of a(1), a(10), a(21), etc. may be hard. - Charles R Greathouse IV, Jul 10 2014 [Corrected by Pontus von Brömssen, Oct 12 2021]
EXAMPLE
14 is not prime. 1415 is not prime. 141516 is not prime. 14151617 is prime. Thus a(14) = 4 since 4 consecutive numbers were concatenated.
PROG
(PARI) a(n) = {p=""; tot=0; for(i=n, 5000, p=concat(p, Str(i)); tot++; if(ispseudoprime(eval(p)), return(tot)))}
n=1; while(n<100, print1(a(n), ", "); n++)
CROSSREFS
KEYWORD
nonn,base,more,hard
AUTHOR
Derek Orr, Jun 27 2014
STATUS
approved