A097312 Numbers with property that can bring the first digit to the back of the number to get a prime (zeros are dropped).
2, 3, 5, 7, 11, 13, 14, 16, 17, 20, 30, 31, 32, 34, 35, 37, 38, 50, 70, 71, 73, 74, 76, 79, 91, 92, 95, 97, 98, 101, 103, 104, 106, 107, 110, 113, 115, 118, 119, 121, 124, 125, 127, 128, 131, 133, 140, 142, 143, 146, 149, 152, 154, 157, 160, 163, 164, 166, 169, 170
Offset: 1
Examples
1234 is in the sequence because 2341 is prime.
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..11018 (all terms < 10**5)
Programs
-
Mathematica
Select[Range[200],PrimeQ[FromDigits[RotateLeft[IntegerDigits[#]]]] &] (* Harvey P. Dale, Jun 06 2018 *)
-
Python
from sympy import isprime def ok(n): s = str(n); return isprime(int(s[1:]+s[0])) print([k for k in range(171) if ok(k)]) # Michael S. Branicky, May 08 2023
Comments