login
A344637
a(n) is the smallest k > 0 such that the number that results from inserting a string of k zeros between all adjacent digits of prime(n) is also prime, or 0 if no such k exists.
4
1, 1, 1, 1, 2, 4, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 1, 30, 1, 1
OFFSET
5,5
COMMENTS
Is a(26) = 0? Note that prime(26) = 101 and 101 is the largest known prime of the form 10^t + 1.
a(A000720(A004022(i))) = 0 for i > 1, i.e., a(n) = 0 if prime(n) is a repunit > 11.
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