login
A318751
Prime-indexed primes q such that prime(q)-q-1 is a prime indexed prime.
2
5, 17, 353, 859, 4787, 5441, 6353, 6841, 7883, 12503, 13037, 16061, 18617, 20959, 25357, 29137, 33029, 38351, 39199, 44729, 46237, 69491, 80429, 82217, 85597, 89989, 92779, 97001, 107903, 129287, 132611, 139661, 170707, 172721, 187123, 230453, 238943, 242129, 257689, 259151, 292841, 312773, 328789, 341423, 346147
OFFSET
1,1
COMMENTS
This sequence and the sequence of resulting primes, prime(q)-q-1 (5, 41, 2027, 5801, 41491, ...), are subsequences of A006450, the prime-indexed primes.
LINKS
N. Fernandez, An order of primeness [cached copy, included with permission of the author]
MAPLE
N := 1000000;
for n to N do
if isprime(n) then q := ithprime(n);
Z := numtheory[pi](n);
S := q-n-1;
W := numtheory[pi](S);
if isprime(Z) and isprime(S) and isprime(W) then print(n);
end if:
end if:
end do:
MATHEMATICA
pipQ[n_]:=Module[{c=Prime[n]-n-1}, AllTrue[{PrimePi[n], c, PrimePi[ c]}, PrimeQ]]; Select[Prime[Range[30000]], pipQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 30 2020 *)
PROG
(PARI) isok(p) = isprime(p) && isprime(primepi(p)) && isprime(q=prime(p)-p-1) && isprime(primepi(q)); \\ Michel Marcus, Sep 03 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected and extended by Harvey P. Dale, Jun 30 2020
STATUS
approved