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 A293142 #20 Aug 11 2024 14:41:34 %S A293142 7,1013,3121,211 %N A293142 Largest nonrepunit base-n circular prime (conjectured). %C A293142 A circular prime is a prime where all numbers produced by cyclic permutations of the digits are also prime. %C A293142 No nonrepunit circular prime exists in base 2, since any nonrepunit prime contains at least one 0 digit in its base-2 representation that yields an even number and thus a composite when permuted to the least significant place, so the offset of the sequence is 3. %C A293142 a(3)-a(6) were found via a brute-force approach searching from the largest prime with 12 base-n digits backwards. The number of base-n digits in a(n) for n = 3, 4, 5, 6 is 2, 5, 5, 3, respectively. Since this is much shorter than 12 digits, it is conjectured that the terms are the maximal circular primes for those bases. This also verifies that no circular primes with a length between A055642(a(n)) and 13 digits exist in bases 3, 4, 5 and 6. %C A293142 Candidates for a(7), a(8) and a(9) are 13143449029, 16244441 and 4717103, respectively. %C A293142 a(10) is probably 999331. If not, it must have more than 23 digits (cf. De Geest link). %H A293142 P. De Geest, <a href="https://www.worldofnumbers.com/circular.htm">Circular Primes</a>, World!Of Numbers. %e A293142 1013 written in base 4 is 33311. The base-4 numbers 33311, 33113, 31133, 11333, 13331 written in base 10 are 1013, 983, 863, 383 and 509, respectively. All those base-10 numbers are prime and since there is no larger prime up to 12 base-4 digits where all cyclic permutations of base-4 digits are primes, 1013 is conjectured to be the largest nonrepunit circular prime in base 4. %o A293142 (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 A293142 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 A293142 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 A293142 a(base, maxlength) = my(p=precprime(base^maxlength)); while(p > 2, if(vecmin(digits(p, base))!=vecmax(digits(p, base)), if(is_circularprime(p, base), return(p))); p=precprime(p-1)) %o A293142 for(n=3, 6, print1(a(n, 12), ", ")) \\ start searching a(n) from largest prime with 12 base-n digits backwards %Y A293142 Cf. A016114, A068652. %Y A293142 Cf. base-b nonrepunit circular primes: A293657 (b=4), A293658 (b=5), A293659 (b=6), A293660 (b=7), A293661 (b=8), A293662 (b=9), A293663 (b=10). %K A293142 nonn,base,more %O A293142 3,1 %A A293142 _Felix Fröhlich_, Oct 01 2017