A344630 Primes p such that exactly six numbers among all circular permutations of the digits of p are prime.
193939, 199933, 319993, 331999, 391939, 393919, 919393, 933199, 939193, 939391, 993319, 999331, 1313999, 1317727, 1399913, 1731893, 1743737, 1772713, 1893173, 1977779, 2713177, 3139991, 3173189, 3177271, 3189317, 3717437, 4373717, 7174373, 7271317, 7318931
Offset: 1
Links
- Felix Fröhlich, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
Select[Prime[Range[500000]],Total[Boole[PrimeQ[FromDigits/@Table[RotateRight[IntegerDigits[#],n],{n,0,IntegerLength[ #]-1}]]]]==6&] (* Harvey P. Dale, Sep 22 2024 *)
-
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==6, 1, 0) forprime(p=1, 1e3, if(is(p), print1(p, ", ")))