OFFSET
1,1
COMMENTS
LINKS
Robert Price, Table of n, a(n) for n = 1..14198
Wikipedia, Sophie Germain prime
Wikipedia, Safe prime
Wikipedia, Cunningham chain
MAPLE
select(t -> isprime(t) and (isprime(2*t+1) or isprime((t-1)/2)), [2, seq(p, p=3..10000, 2)]); # Robert Israel, May 03 2016
MATHEMATICA
Select[Prime@ Range@ 180, PrimeQ[2 # + 1] || PrimeQ[(# - 1)/2] &] (* Michael De Vlieger, Apr 06 2016 *)
PROG
(PARI) lista(nn) = {forprime(p=2, nn, if (isprime(2*p+1) || isprime((p-1)/2), print1(p, ", ")); ); } \\ Michel Marcus, Apr 06 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Feb 13 2009
STATUS
approved