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

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

%S 10061,20071,161093,200713,291419,564979,600791,606839,693079,1826519,

%T 1876807,2106407,2249207,2471471,3335369,3955499,4542547,4765609,

%U 4829603,4955981,5090507,5534993,5866247,5987921,6091213,6399521,6519613,6522539

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

%C p, 10*p+3, 100*p+33, 1000*p+333, 10000*p+3333 and 100000*p+33333 are prime for each term p. - _Vincenzo Librandi_, Aug 05 2010

%H John Cerkan, <a href="/A023356/b023356.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) == 9 (mod 14). - _John Cerkan_, Aug 26 2016

%t ok5Q[n_]:=And@@PrimeQ/@Rest[NestList[10#+3&,n,5]]; Select[Prime[ Range[500000]],ok5Q] (* _Harvey P. Dale_, Mar 28 2011 *)

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

%o (PARI) is(n)=isprime(n) && isprime(10*n+3) && isprime(100*n+33) && isprime(1000*n+333) && isprime(10000*n+3333) && isprime(100000*n+33333) \\ _Charles R Greathouse IV_, Jul 28 2016

%K nonn

%O 1,1

%A _David W. Wilson_