The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A286678 A081479 A335313 * A096996 A256236 A070294
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected and extended by Harvey P. Dale, Jun 30 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 22 15:18 EDT 2024. Contains 372758 sequences. (Running on oeis4.)