login
Primes that remain prime through 4 iterations of function f(x) = 10x + 3.
1

%I #22 Sep 08 2022 08:44:47

%S 2,10061,11777,17489,17839,19379,19441,20071,21773,30809,32069,36529,

%T 39511,40973,45503,52223,66943,83813,100613,112213,120067,135089,

%U 144427,151573,156887,161093,164999,179111,179497,185923,200713,219943,227489

%N Primes that remain prime through 4 iterations of function f(x) = 10x + 3.

%C Primes p such that 10*p+3, 100*p+33, 1000*p+333 and 10000*p+3333 are also primes. - _Vincenzo Librandi_, Aug 04 2010

%H Harvey P. Dale, <a href="/A023328/b023328.txt">Table of n, a(n) for n = 1..1000</a>

%t p4iQ[n_]:=And@@PrimeQ[NestList[10#+3&,n,4]]; Select[Prime[Range[21000]], p4iQ] (* _Harvey P. Dale_, Oct 02 2012 *)

%o (Magma) [n: n in [1..5000000] | IsPrime(n) and IsPrime(10*n+3) and IsPrime(100*n+33) and IsPrime(1000*n+333) and IsPrime(10000*n+3333)] // _Vincenzo Librandi_, Aug 04 2010

%K nonn

%O 1,1

%A _David W. Wilson_