login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A293661 Base-8 circular primes that are not base-8 repunits. 7
13, 29, 31, 41, 43, 47, 59, 61, 607, 719, 751, 761, 971, 1021, 1657, 1759, 1787, 1913, 1993, 2011, 2687, 3019, 3659, 3673, 3677, 3803, 3919, 4073, 49103, 56299, 62207, 105341, 130681, 177007, 188249, 195277, 235513, 237151, 251501, 259019, 4127707, 6807419 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Conjecture: The sequence is finite.

From Michael De Vlieger, Dec 30 2017: (Start)

Primes in this sequence must only have odd digits.

There are 8 terms with 2 octal digits, 20 terms with 4 octal digits, 12 terms with 6 octal digits, and 8 terms with 8 octal digits.

a(49), if it exists, must be larger than 8^12 = 68719476736. (End)

LINKS

Table of n, a(n) for n=1..42.

EXAMPLE

607 written in base 8 is 1137. The base-8 numbers 1137, 1371, 3711, 7113 written in base 10 are 607, 761, 1993, 3659, respectively, and all those numbers are prime, so 607, 761, 1993 and 3659 are terms of the sequence.

MATHEMATICA

With[{b = 8}, Select[Prime@ Range[PrimePi@ b + 1, 10^6], Function[w, And[AllTrue[Array[FromDigits[RotateRight[w, #], b] &, Length@ w - 1], PrimeQ], Union@ w != {1} ]]@ IntegerDigits[#, b] &]] (* or *)

With[{b = 8}, Select[Flatten@ Array[FromDigits[#, b] & /@ Most@ Rest@ Tuples[Range[1, 7, 2], #] &, 6, 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, 8))!=vecmax(digits(p, 8)), if(is_circularprime(p, 8), print1(p, ", "))))

CROSSREFS

Cf. A007094, A293142.

Cf. base-b nonrepunit circular primes: A293657 (b=4), A293658 (b=5), A293659 (b=6), A293660 (b=7), A293662 (b=9), A293663 (b=10).

Sequence in context: A018974 A018955 A240819 * A087593 A158075 A087594

Adjacent sequences:  A293658 A293659 A293660 * A293662 A293663 A293664

KEYWORD

nonn,base

AUTHOR

Felix Fröhlich, Dec 30 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 17 19:02 EDT 2019. Contains 327137 sequences. (Running on oeis4.)