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!)
A293657 Base-4 circular primes that are not base-4 repunits. 7
7, 13, 23, 29, 53, 383, 509, 863, 983, 1013 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Conjecture: The sequence is finite, with 1013 being the last term (see A293142).
Written in base 4 (A007090), the terms are 13, 31, 113, 131, 311, 11333, 13331, 31133, 33113, 33311. - Antti Karttunen, Nov 26 2017
From Michael De Vlieger, Dec 30 2017: (Start)
The digits of primes in this sequence must be in the reduced residue system modulo 4, i.e., {1, 3}.
a(11), if it exists, must be larger than 4^21 = 4398046511104. (End)
LINKS
EXAMPLE
53 written in base 4 is 311. The base-4 numbers 311, 131, 113 written in base 10 are 53, 29, 23, respectively and all those numbers are prime, so 23, 29 and 53 are terms of the sequence.
MATHEMATICA
With[{b = 4}, Select[Array[Map[If[Union@ # == {1}, 0, FromDigits[#, b]] &, NestList[RotateLeft, #, Length@ # - 1]] &@ IntegerDigits[Prime@ #, b] &, 10^6, If[PrimeQ@ b, #, # + 1] &@ PrimePi@ b], AllTrue[#, PrimeQ] &][[All, 1]] ] (* Michael De Vlieger, Nov 26 2017 *)
With[{b = 4}, Select[Flatten@ Array[FromDigits[#, b] & /@ Most@ Rest@ Tuples[{1, 3}, #] &, 18, 2], Function[w, And[ AllTrue[ Array[ FromDigits[ RotateRight[w, #], b] &, Length@ w], PrimeQ], Union@ w != {1} ]]@ IntegerDigits[#, b] &]] (* Michael De Vlieger, Dec 30 2017 *)
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
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))))
forprime(p=1, , if(vecmin(digits(p, 4))!=vecmax(digits(p, 4)), if(is_circularprime(p, 4), print1(p, ", "))))
CROSSREFS
Cf. base-b nonrepunit circular primes: A293658 (b=5), A293659 (b=6), A293660 (b=7), A293661 (b=8), A293662 (b=9), A293663 (b=10).
Sequence in context: A339112 A340020 A106349 * A048449 A147812 A043884
KEYWORD
nonn,base,more
AUTHOR
Felix Fröhlich, Oct 28 2017
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 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)