A344632 Primes p such that exactly eight numbers among all circular permutations of the digits of p are prime.
119139133, 133119139, 139133119, 191391331, 311913913, 331191391, 913311913, 913913311, 1013517313, 1033939939, 1039191919, 1112795317, 1113194339, 1117923797, 1127953171, 1131943391, 1139937913, 1173917197, 1179237971, 1279531711, 1310135173, 1311399379
Offset: 1
Crossrefs
Programs
-
PARI
rot(n) = if(#Str(n)==1, v=vector(1), v=vector(#n-1)); for(i=2, #n, v[i-1]=n[i]); u=vector(#n); for(i=1, #n, u[i]=n[i]); v=concat(v, u[1]); v eva(n) = subst(Pol(n), x, 10) is(n) = my(r=rot(digits(n)), i=0); while(r!=digits(n), if(ispseudoprime(eva(r)), i++); r=rot(r)); if(ispseudoprime(eva(r)), i++); if(n==1 || n==11, return(0)); if(i==8, 1, 0) forprime(p=1, , if(is(p), print1(p, ", ")))