OFFSET
1,1
COMMENTS
Numbers n such that n remains prime through 2 iterations of function f(x) = 2x - 1.
LINKS
EXAMPLE
Triplets are (2,3,5), (19,37,73), (79,157,313), (331,661,1321), ...
MAPLE
select(p -> andmap(isprime, [p, 2*p-1, 4*p-3]), [seq(p, p=0..10000)]); # K. D. Bajpai, Jun 26 2017
MATHEMATICA
Select[Prime[Range[1500]], And@@PrimeQ[NestList[2#-1&, #, 2]]&] (* Harvey P. Dale, Dec 09 2011 *)
PROG
(PARI) forprime(p= 1, 100000, if(isprime(2*p-1) && isprime(4*p-3), print1(p, ", "))); \\ K. D. Bajpai, Jun 26 2017
(Magma) [p: p in PrimesUpTo (10000) | IsPrime(2*p-1) and IsPrime(4*p-3)]; // K. D. Bajpai, Jun 26 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Patrick De Geest, Aug 15 2000
EXTENSIONS
Offset set to 1 by Michel Marcus, Jul 02 2017
STATUS
approved