%I #29 Mar 20 2023 03:32:46
%S 1531,6841,15391,16651,33301,44371,57991,66601,83431,105871,145021,
%T 150151,165901,199621,209431,212851,231241,242551,291271,319681,
%U 331801,346141,377491,381631,385591,445741,451411,478801,481021,506791,507781
%N First member of a prime 5-tuple in a 2p-1 progression.
%C Numbers n such that n remains prime through 4 iterations of function f(x) = 2x - 1.
%H Harvey P. Dale, <a href="/A057328/b057328.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Pri#primes_AP">Index entries for sequences related to primes in arithmetic progressions</a>
%e Quintuplets are (1531, 3061, 6121, 12241, 24481), (6841, 13681, 27361, 54721, 109441), ...
%t pQ[n_] := And @@ PrimeQ[NestList[2 # - 1 &, n, 4]]; t = {}; Do[p = Prime[n]; If[pQ[p], AppendTo[t, p]], {n, 42500}]; t (* _Jayanta Basu_, Jun 17 2013 *)
%t Select[Prime[Range[50000]],AllTrue[Rest[NestList[2#-1&,#,4]],PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Mar 30 2019 *)
%o (Magma) [ p: p in PrimesUpTo(6*10^5) | forall{q: k in [1..4] | IsPrime(q) where q is 2^k*(p-1)+1} ]; // _Bruno Berselli_, Nov 23 2011
%Y Cf. A005382, A005383, A057326, A057327, A057329, A057330, A005603.
%K nonn
%O 1,1
%A _Patrick De Geest_, Aug 15 2000