OFFSET
5,5
COMMENTS
EXAMPLE
For n = 10: prime(10) = 29 and 200009 is the smallest prime obtained by inserting a string of zeros between all adjacent digits, so a(10) = 4.
PROG
(PARI) eva(n) = subst(Pol(n), x, 10)
insert_zeros(num, len) = my(d=digits(num), v=[]); for(k=1, #d-1, v=concat(v, concat([d[k]], vector(len)))); v=concat(v, d[#d]); eva(v)
a(n) = my(p=prime(n)); for(k=1, oo, if(ispseudoprime(insert_zeros(p, k)), return(k)))
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Felix Fröhlich, May 25 2021
STATUS
approved