OFFSET
1,2
COMMENTS
First index i such that NextPrime[p2=2*Prime[i]]-p2 is 2n-1; case n=1 corresponds to Sophie Germain (SG) primes, others may be called SG n-primes. Distance between 2*(n-th prime) and next prime in A059787.
EXAMPLE
a(54) = 342337 because difference between 2*p(342337) and next prime is 2*54 -1 = 107 and 342337 is the smallest such index.
PROG
(PARI) a(n) = {i = 1; while (nextprime(p2=2*prime(i)) - p2 != 2*n-1, i++); i; } \\ Michel Marcus, Oct 03 2013
(Magma)
S:=[];
i:=1;
for n in [1..45] do
while not NextPrime(2*NthPrime(i))-2*NthPrime(i) eq 2*n-1 do
i:=i+1;
end while;
Append(~S, i);
i:=1;
end for;
S; // Bruno Berselli, Oct 03 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Oct 06 2002
EXTENSIONS
a(44)-a(45) from Bruno Berselli, Oct 03 2013
STATUS
approved