login
A344632
Primes p such that exactly eight numbers among all circular permutations of the digits of p are prime.
6
119139133, 133119139, 139133119, 191391331, 311913913, 331191391, 913311913, 913913311, 1013517313, 1033939939, 1039191919, 1112795317, 1113194339, 1117923797, 1127953171, 1131943391, 1139937913, 1173917197, 1179237971, 1279531711, 1310135173, 1311399379
OFFSET
1,1
PROG
(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, ", ")))
CROSSREFS
Cf. A270083. Row 8 of A317716.
Cf. primes where exactly k numbers among all circular permutations of digits are prime: A068654 (k=1), A344626 (k=2), A344627 (k=3), A344628 (k=4), A344629 (k=5), A344630 (k=6), A344631 (k=7).
Sequence in context: A157770 A195282 A186804 * A015380 A250458 A038131
KEYWORD
nonn,base
AUTHOR
Felix Fröhlich, May 25 2021
STATUS
approved