A293142 Largest nonrepunit base-n circular prime (conjectured).
7, 1013, 3121, 211
Offset: 3
Examples
1013 written in base 4 is 33311. The base-4 numbers 33311, 33113, 31133, 11333, 13331 written in base 10 are 1013, 983, 863, 383 and 509, respectively. All those base-10 numbers are prime and since there is no larger prime up to 12 base-4 digits where all cyclic permutations of base-4 digits are primes, 1013 is conjectured to be the largest nonrepunit circular prime in base 4.
Links
- P. De Geest, Circular Primes, World!Of Numbers.
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 decimal(v, base) = my(w=[]); for(k=0, #v-1, w=concat(w, v[#v-k]*base^k)); sum(i=1, #w, w[i]) is_circularprime(p, base) = my(db=digits(p, base), r=rot(db), i=0); if(vecmin(db)==0, return(0), while(1, dec=decimal(r, base); if(!ispseudoprime(dec), return(0)); r=rot(r); if(r==db, return(1)))) a(base, maxlength) = my(p=precprime(base^maxlength)); while(p > 2, if(vecmin(digits(p, base))!=vecmax(digits(p, base)), if(is_circularprime(p, base), return(p))); p=precprime(p-1)) for(n=3, 6, print1(a(n, 12), ", ")) \\ start searching a(n) from largest prime with 12 base-n digits backwards
Comments