OFFSET
1,1
COMMENTS
By the conjecture in A236097, this sequence should have infinitely many terms.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Z.-W. Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014
EXAMPLE
a(1) = 5 since neither prime(2) - 2 - 1 = 0 nor prime(3) - 3 - 1 = 1 is prime, but prime(5) - 5 - 1 = 5 and prime(5) - 5 + 1 = 7 are both prime.
MATHEMATICA
p[n_]:=PrimeQ[Prime[n]-n-1]&&PrimeQ[Prime[n]-n+1]
n=0; Do[If[p[Prime[k]], n=n+1; Print[n, " ", Prime[k]]], {k, 1, 1100}]
PROG
(PARI) s=[]; forprime(p=2, 10000, if(isprime(prime(p)-p-1) && isprime(prime(p)-p+1), s=concat(s, p))); s \\ Colin Barker, Jan 19 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jan 19 2014
STATUS
approved