OFFSET
1,1
COMMENTS
For many small n, if the decimal expansion of a(n) contains the digit 0, then a(n+1) is a(n) with one zero digit removed. However, this is not true in general. The counterexamples' indices in this sequence are given by A344860.
LINKS
Felix Fröhlich, Table of n, a(n) for n = 1..2300
EXAMPLE
For n = 13: If a string of 13 zeros is inserted between the digits 1 and 3 in 137, the resulting number is 1000000000000037, which is prime. Since 137 is the smallest prime where such a string of 13 zeros can be inserted to get another prime, a(13) = 137.
PROG
(PARI) insert(n, len, pos) = my(d=digits(n), v=[], w=[]); for(y=1, pos, v=concat(v, d[y])); v=concat(v, vector(len)); for(z=pos+1, #d, v=concat(v, d[z])); subst(Pol(v), x, 10)
a(n) = forprime(p=10, , for(k=1, #digits(p)-1, my(zins=insert(p, n, k)); if(ispseudoprime(zins), return(p))))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Mar 16 2019
STATUS
approved