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

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

%S 3,19,47,149,199,233,353,563,607,709,919,1013,1361,1367,1697,1801,

%T 1871,2137,2203,2819,2879,2917,3041,3229,3449,3701,3943,4093,4111,

%U 4177,4567,4973,5519,5689,5987,6053,6359,6421,6841,7019,7283,8647,8951,9109,9719

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

%C Primes p such that 3*p+10, 9*p+40 and 27*p+130 are also primes. - _Vincenzo Librandi_, Aug 04 2010

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

%t Select[Prime[Range[1200]],AllTrue[Rest[NestList[3#+10&,#,3]],PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Mar 22 2015 *)

%o (Magma) [n: n in [1..150000] | IsPrime(n) and IsPrime(3*n+10) and IsPrime(9*n+40) and IsPrime(27*n+130)] // _Vincenzo Librandi_, Aug 04 2010

%K nonn

%O 1,1

%A _David W. Wilson_