|
|
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.
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
|
|
|
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
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|