OFFSET
1,1
COMMENTS
Prime-indexed Sophie Germain primes whose associated safe primes are also prime-indexed. Subsequence of A005384.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..300
N. Fernandez, An order of primeness, F(p)
N. Fernandez, An order of primeness [cached copy, included with permission of the author]
EXAMPLE
5 = prime(3) is a prime-indexed prime, and 2*5 + 1 = 11 = prime(5) is also a prime-indexed prime. Therefore 5 is in the sequence.
3 = prime(2) is a prime-indexed prime, but 2*3 + 1 = 7 = prime(4) is not a prime-indexed prime since 4 is composite. Therefore 3 is not in the sequence.
MATHEMATICA
Select[Table[Prime[p], {p, Prime[Range[5000]]}], AllTrue[{2#+1, PrimePi[2#+1]}, PrimeQ]&] (* Harvey P. Dale, Jun 18 2023 *)
PROG
(PARI) isok(p) = isprime(p) && isprime(primepi(p)) && isprime(2*p+1) && isprime(primepi(2*p+1)); \\ Michel Marcus, Aug 28 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Aug 23 2018
EXTENSIONS
More terms from Michel Marcus, Aug 28 2018
STATUS
approved