login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A317689 Largest nonrepunit base-n absolute prime (conjectured). 1
7, 53, 3121, 211, 1999, 3803, 6469, 991, 161047, 19793, 16477, 24907, 683437, 3547, 67853, 80273, 94109, 72421 (list; graph; refs; listen; history; text; internal format)
OFFSET
3,1
COMMENTS
A base-b permutable or absolute prime is a prime p such that all numbers obtained from every permutation of the base-b digits of p and converted to base 10 are prime.
These primes were found using lim=10^8 in the PARI program and match those found with lim=10^5, lim=10^6 and lim=10^7. Therefore I conjecture that they are the correct values for those n.
LINKS
PROG
(PARI) find_index_a(vec) = my(r=#vec-1); while(1, if(vec[r] < vec[r+1], return(r)); r--; if(r==0, return(-1)))
find_index_b(r, vec) = my(s=#vec); while(1, if(vec[r] < vec[s], return(s)); s--; if(s==r, return(-1)))
switch_elements(vec, firstpos, secondpos) = my(g); g=vec[secondpos]; vec[secondpos]=vec[firstpos]; vec[firstpos] = g; vec
reverse_order(vec, r) = my(v=[], w=[]); for(x=1, r, v=concat(v, vec[x])); for(y=r+1, #vec, w=concat(w, vec[y])); w=Vecrev(w); concat(v, w)
next_permutation(vec) = my(r=find_index_a(vec)); if(r==-1, return(0), my(s=find_index_b(r, vec)); vec=switch_elements(vec, r, s); vec=reverse_order(vec, r)); vec
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_absolute_prime(n, base) = my(db=vecsort(digits(n, base))); if(vecmin(db)==0 || vecmax(db)==1, return(0)); while(1, my(dec=decimal(db, base)); if(!ispseudoprime(dec), return(0)); db=next_permutation(db); if(db==0, return(1)))
a(n) = my(absp=0, lim=10^7, i=0); forprime(p=n+1, , if(is_absolute_prime(p, n), absp=p); i++; if(i==lim, return(absp)))
CROSSREFS
Sequence in context: A062207 A073564 A194929 * A116202 A203289 A204258
KEYWORD
nonn,base,more
AUTHOR
Felix Fröhlich, Aug 04 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)