OFFSET
1,1
EXAMPLE
PROG
(PARI) eva(n) = subst(Pol(n), x, 10)
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])); eva(v)
a306920(n) = forprime(p=10, , for(k=1, #digits(p)-1, my(zins=insert(p, n, k)); if(ispseudoprime(zins), return(p))))
remove_zeros(n) = my(v=[], w=[], d=digits(n)); for(x=1, #d, if(d[x]==0, for(y=1, x-1, w=concat(w, d[y])); for(z=x+1, #d, w=concat(w, d[z]))); if(#w > 0, v=concat(v, [eva(w)])); w=[]); vecsort(v, , 8)
is(n) = my(x=a306920(n), y=a306920(n+1), rz=remove_zeros(x)); if(#setintersect([0], vecsort(digits(x)))==0, return(0)); for(k=1, #rz, if(y==rz[k], return(0))); 1
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, May 31 2021
STATUS
approved