OFFSET
1,1
COMMENTS
Since all consecutive primes, p < q and p greater than 2, are odd, therefore gcd(p+1, q+1) must be even.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..200
EXAMPLE
MATHEMATICA
a = Table[0, {100}]; p = 3; q = 5; Do[q = Prime[n + 1]; d = GCD[p + 1, q + 1]/2; If[d < 101 && a[[d]] == 0, a[[d]] = n]; b = c, {n, 2, 10^7}]; Prime[a]
PROG
(PARI) a(n)=my(k=2*n); forstep(p=k-1, oo, k, if(isprime(p) && (nextprime(p+1)-p)%k==0, return(p))) \\ Charles R Greathouse IV, Aug 17 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Jan 31 2002
STATUS
approved