A086004 Primes which remain prime after one and after two and after three applications of the rotate-and-add operation of A086002.
12917, 12919, 18911, 18913, 22907, 24907, 26903, 28901, 1088063, 1288043, 1408031, 1428029, 1528019, 100083679, 100280419, 100283849, 100483847, 100692793, 100880413, 101080159, 101283839, 101683093, 101683663, 102080149
Offset: 1
Examples
a(1)=12917 is in the sequence because 2-fold rotate-and-add yields the prime 60659 as shown in A086003, and the third application yields 60659+59660 = 120319 which still is prime.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
rot[n_]:=Module[{idn=IntegerDigits[n],len},len=Length[idn];If[OddQ[ len],FromDigits[ Join[ Take[idn,-Floor[len/2]],{idn[[(len+1)/2]]},Take[idn,Floor[len/2]]]],FromDigits[ Join[ Take[idn,-len/2],Take[idn,len/2]]]]]; a3rotQ[n_]:=AllTrue[Rest[NestList[ #+rot[ #]&,n,3]],PrimeQ]; Select[Prime[Range[5880000]],a3rotQ] (* Harvey P. Dale, Apr 26 2022 *)
Extensions
Condensed by R. J. Mathar, Sep 17 2009
Comments