OFFSET
1,1
COMMENTS
EXAMPLE
For n = 13: Inserting 13 zeros between all adjacent digits of 127 gives 10000000000000200000000000007, which is prime. Since 127 is the smallest prime where inserting exactly 13 zeros between all adjacent digits results in a number that is also prime, a(13) = 127.
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) = forprime(p=10, , if(ispseudoprime(insert_zeros(p, n)), return(p)))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, Jun 04 2021
STATUS
approved