This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A293658 #17 Jan 06 2018 22:05:07 %S A293658 7,11,13,17,19,23,167,211,239,283,359,431,547,571,1069,1249,1733,2221, %T A293658 2417,2713,2749,3049,3109,3121 %N A293658 Base-5 circular primes that are not base-5 repunits. %C A293658 Conjecture: The sequence is finite, with 3121 being the last term (see A293142). %C A293658 Written in base 5 (A007091), the terms are 12, 21, 23, 32, 34, 43, 1132, 1321, 1424, 2113, 2414, 3211, 4142, 4241, 13234, 14444, 23413, 32341, 34132, 41323, 41444, 44144, 44414, 44441. - _Antti Karttunen_, Nov 26 2017 %C A293658 a(25), if it exists, must be larger than prime(10^6) = 15485863, an 11-digit quinary number. - _Michael De Vlieger_, Nov 26 2017 %e A293658 1069 written in base 5 is 13234. The base-5 numbers 13234, 32341, 23413, 34132, 41323 written in base 10 are 1069, 2221, 1733, 2417, 2713, respectively and all those numbers are prime, so 1069, 1733, 2221, 2417 and 2713 are terms of the sequence. %t A293658 Select[Array[Map[If[Union@ # == {1}, 0, FromDigits[#, 5]] &, NestList[RotateLeft, #, Length@ # - 1]] &@ IntegerDigits[Prime@ #, 5] &, 10^5, 4], AllTrue[#, PrimeQ] &][[All, 1]] (* _Michael De Vlieger_, Nov 26 2017 *) %o A293658 (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 %o A293658 decimal(v, base) = my(w=[]); for(k=0, #v-1, w=concat(w, v[#v-k]*base^k)); sum(i=1, #w, w[i]) %o A293658 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)))) %o A293658 forprime(p=1, , if(vecmin(digits(p, 5))!=vecmax(digits(p, 5)), if(is_circularprime(p, 5), print1(p, ", ")))) %Y A293658 Cf. A007091, A293142. %Y A293658 Cf. base-b nonrepunit circular primes: A293657 (b=4), A293659 (b=6), A293660 (b=7), A293661 (b=8), A293662 (b=9), A293663 (b=10). %K A293658 nonn,base,more %O A293658 1,1 %A A293658 _Felix Fröhlich_, Oct 28 2017