OFFSET
1,1
LINKS
Daniel Suteu, Table of n, a(n) for n = 1..100
N. Fernandez, An order of primeness, F(p)
N. Fernandez, An order of primeness [cached copy, included with permission of the author]
Daniel Suteu, Perl program
EXAMPLE
Prime(3) = 5 is in the sequence: it is a prime-indexed prime, prime(5) + 5 + 1 = 11 + 5 + 1 = 17 = prime(7) is a prime-indexed prime, and prime(5) - 5 - 1 = 5 = prime(3) is also a prime-indexed prime.
MAPLE
N := 25000000:
for n to N do
if isprime(n) then q := ithprime(n);
Z := numtheory[pi](n);
P := q+n+1;
S := q-n-1;
X := numtheory[pi](P);
W := numtheory[pi](S);
if isprime(Z) and isprime(P) and isprime(S) and isprime(X) and isprime(W) then print(n);
end if:
end if:
end do:
PROG
(PARI) isok(p) = isprime(p) && isprime(primepi(p)) && isprime(q=prime(p)-p-1) && isprime(primepi(q)) && isprime(qq=prime(p)+p+1) && isprime(primepi(qq)); \\ Michel Marcus, Sep 03 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Sep 02 2018
EXTENSIONS
a(13)-a(29) from Daniel Suteu, Nov 11 2018
STATUS
approved