OFFSET
1,1
COMMENTS
See the closely related sequence A016114 for further information. - N. J. A. Sloane, May 04 2017
These numbers are sometimes called circular primes. - Tanya Khovanova, Jul 29 2024
LINKS
Ray Chandler, Table of n, a(n) for n = 1..57
K. S. Brown, On General Palindromic Numbers
C. K. Caldwell, Circular Primes
Patrick De Geest, Circular Primes
Gianni A. Sarcone, Tourbillonnants nombres premiers, Tangente Web Site, No date.
Wikipedia, Circular prime
EXAMPLE
197 is a member as all the three cyclic permutations 197,971,719 are primes.
MATHEMATICA
fQ[p_] := Module[{b = IntegerDigits[p]}, And @@ Table[PrimeQ[FromDigits[b = RotateLeft[b]]], {Length[b] - 1}]]; Select[Prime[Range[100000]], fQ] (* T. D. Noe, Mar 22 2012 *)
ecppQ[n_]:=AllTrue[FromDigits/@Table[RotateLeft[IntegerDigits[n], i], {i, IntegerLength[n]}], PrimeQ]; Select[Range[400000], ecppQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Nov 25 2015 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Feb 28 2002
EXTENSIONS
More terms from Martin Renner, Apr 10 2002
STATUS
approved