login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

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

%S 10009,575119,724499,1373819,1725359,3188569,3715669,4980499,5939779,

%T 9202199,9565709,13707469,14483839,14886829,15412739,16158589,

%U 16740709,18207349,19429409,22428209,22602719,22722419,22749019,22877119,24171209

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

%C Primes p such that 3*p+2, 9*p+8, 27*p+26, 81*p+80 and 243*p+242 are also primes. - _Vincenzo Librandi_, Aug 04 2010

%H Vincenzo Librandi, <a href="/A023335/b023335.txt">Table of n, a(n) for n = 1..180</a>

%t p5Q[n_]:=And@@PrimeQ[Rest[NestList[3#+2&,n,5]]]; Select[ Prime[ Range[ 1600000]], p5Q] (* _Harvey P. Dale_, May 02 2011 *)

%o (Magma) [p: p in PrimesUpTo(25*10^6) | forall{k: k in [1..5] | IsPrime((p+1)*3^k-1)}]; // _Bruno Berselli_, May 03 2011

%K nonn

%O 1,1

%A _David W. Wilson_