cp's OEIS Frontend

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.

A293660 Base-7 circular primes that are not base-7 repunits.

This page as a plain text file.
%I A293660 #13 May 31 2019 03:11:13
%S A293660 11,13,17,19,23,29,37,41,43,47,79,89,97,109,131,211,233,257,263,281,
%T A293660 307,337,439,479,509,571,619,673,677,853,941,953,977,997,1021,1097,
%U A293660 1117,1163,1171,1453,1511,1531,1579,1597,1657,1777,1787,1811,1871,1933,1951
%N A293660 Base-7 circular primes that are not base-7 repunits.
%C A293660 Conjecture: The sequence is finite, with 13143449029 being the last term. - [Comment extended by _Felix Fröhlich_, May 30 2019]
%H A293660 Felix Fröhlich, <a href="/A293660/b293660.txt">Table of n, a(n) for n = 1..141</a>
%e A293660 109 written in base 7 is 214. The base-7 numbers 214, 142, 421 written in base 10 are 109, 79, 211, respectively, and all those numbers are prime, so 79, 109 and 211 are terms of the sequence.
%t A293660 With[{b = 7}, Select[Prime@ Range[PrimePi@ b + 1, 300], Function[w, And[AllTrue[Array[FromDigits[RotateRight[w, #], b] &, Length@ w - 1], PrimeQ], Union@ w != {1} ]]@ IntegerDigits[#, b] &]] (* _Michael De Vlieger_, Dec 30 2017 *)
%o A293660 (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 A293660 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 A293660 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 A293660 forprime(p=1, , if(vecmin(digits(p, 7))!=vecmax(digits(p, 7)), if(is_circularprime(p, 7), print1(p, ", "))))
%Y A293660 Cf. A007093, A293142.
%Y A293660 Cf. base-b nonrepunit circular primes: A293657 (b=4), A293658 (b=5), A293659 (b=6), A293661 (b=8), A293662 (b=9), A293663 (b=10).
%K A293660 nonn,base
%O A293660 1,1
%A A293660 _Felix Fröhlich_, Dec 30 2017