OFFSET
1,4
COMMENTS
If a(n)=1 then prime(n) is a Sophie Germain prime.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
with(numtheory): [seq(nextprime(2*ithprime(k))-2*ithprime(k), k=1..256)];
MATHEMATICA
Table[n2=2Prime[n]; NextPrime[n2]-n2, {n, 110}] (* Harvey P. Dale, Jun 07 2012 *)
PROG
(PARI) a(n) = my(pp=2*prime(n)); nextprime(pp) - pp; \\ Michel Marcus, Mar 22 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Labos Elemer, Feb 22 2001
STATUS
approved