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

%I #34 Sep 17 2024 14:54:14

%S 3,11,13,31,41,43,53,101,113,211,223,263,283,431,433,491,521,563,571,

%T 601,631,641,673,743,811,911,1151,1361,1621,1693,1973,2243,2393,3083,

%U 3163,3181,3343,3461,3821,3923,4481,4523,4561,4591,4663,4861,4903,5051,5261

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

%C Primes p such that 3*p+8 and 9*p+32 are also primes. - _Vincenzo Librandi_, Aug 04 2010

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

%F a(n) == 1 or 3 (mod 10) for n >= 2. - _John Cerkan_, Sep 13 2016

%t Select[Range@ 5280, Times @@ Boole@ PrimeQ@ NestList[3 # + 8 &, #, 2] > 0 &] (* _Michael De Vlieger_, Sep 13 2016 *)

%t fQ[p_]:=AllTrue[Rest[NestList[3#+8&,p,2]],PrimeQ]; Select[Prime[Range[700]],fQ] (* _Harvey P. Dale_, Sep 01 2024 *)

%o (Magma) [n: n in [0..100000] | IsPrime(n) and IsPrime(3*n+8) and IsPrime(9*n+32)]; // _Vincenzo Librandi_, Aug 04 2010

%Y Subsequence of A023210.

%K nonn

%O 1,1

%A _David W. Wilson_