OFFSET
1,1
COMMENTS
Numbers with a zero digit have been excluded as cycling through these numbers would generate leading zeros, which is problematic as you continue to cycle.
All terms have even length.
The smallest terms with 6, 8,..., 18 digits are 112927, 11117363, 1111319791, 111111335143, 11112333396319, 1111115783474981, and 111111119937131947, respectively. - Giovanni Resta, Jun 13 2018
LINKS
Philip Mizzi, Table of n, a(n) for n = 1..101
EXAMPLE
n=1
N_0 = 19 (prime)
N_1 = 91 (nonprime)
N_2 = N_0 = 19 (prime)
.
.
n=13 [left cyclic shift]
N_0 = 1163 (prime)
N_1 = 1631 (nonprime)
N_2 = 6311 (prime)
N_3 = 3116 (nonprime)
N_4 = N_0 = 1163 (prime)
.
.
n=13 [right cyclic shift]
N_0 = 1163 (prime)
N_1 = 3116 (nonprime)
N_2 = 6311 (prime)
N_3 = 1631 (nonprime)
N_4 = N_0 = 1163 (prime)
MATHEMATICA
ok[n_] := Catch[Block[{d = IntegerDigits[n]}, If[Min[d] == 0 || OddQ[ Length[d]], Throw@ False]; Do[If[PrimeQ[ FromDigits@ RotateLeft[d, j]] == OddQ[j], Throw@ False], {j, Length[d]-1}]; True]]; Select[ Prime@ Range@ 670], ok] (* Giovanni Resta, Jun 12 2018 *)
PROG
(PARI) ok(p)={my(k=logint(p, 10)); k%2 && isprime(p) && vecmin(digits(p))>0 && !#select(i->isprime(p\10^i + p%10^i*10^(k+1-i))==i%2, [1..k])} \\ Andrew Howroyd, Jun 11 2018
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Philip Mizzi, Jun 11 2018
STATUS
approved