OFFSET
1,1
COMMENTS
Primes p such that both (p-1)/2 and 2*p+1 are prime.
Except for 5, all are congruent to 11 modulo 12.
Primes "inside" Cunningham chains of first kind.
Infinite under Dickson's conjecture. - Charles R Greathouse IV, Jul 18 2012
See A162019 for the subset of a(n) that are "reproduced" by the application of the transformations (a(n)-1)/2 and 2*a(n)+1 to the set a(n). - Richard R. Forberg, Mar 05 2015
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe)
Chris K. Caldwell, Cunningham Chains.
FORMULA
A156660(a(n))*A156659(a(n)) = 1; A156877 gives numbers of these numbers <= n. - Reinhard Zumkeller, Feb 18 2009
EXAMPLE
83 is a term because it is prime and 2*83+1 = 167 and (83-1)/2 = 41 are both primes.
MATHEMATICA
lst={}; Do[p=Prime[n]; If[PrimeQ[(p-1)/2]&&PrimeQ[2*p+1], AppendTo[lst, p]], {n, 7!}]; lst (* Vladimir Joseph Stephan Orlovsky, Dec 02 2008 *)
Select[Prime[Range[1000]], AllTrue[{(# - 1)/2, 2 # + 1}, PrimeQ] &] (* requires Mathematica 10+; Feras Awad, Dec 19 2018 *)
PROG
(PARI) forprime(p=2, 1e5, if(isprime(p\2)&&isprime(2*p+1), print1(p", "))) \\ Charles R Greathouse IV, Jul 15 2011
(Magma) [p: p in PrimesUpTo(20000) |IsPrime((p-1) div 2) and IsPrime(2*p+1)]; // Vincenzo Librandi, Oct 31 2014
(Python)
from itertools import count, islice
from sympy import isprime, prime
def A059455_gen(): # generator of terms
return filter(lambda p:isprime(p>>1) and isprime(p<<1|1), (prime(i) for i in count(1)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Feb 02 2001
STATUS
approved
