login
A074973
Smallest index i such that next_prime( 2*prime(i) ) - 2*prime(i) = 2n - 1.
1
1, 4, 11, 20, 17, 67, 104, 56, 125, 165, 182, 316, 236, 359, 407, 1254, 667, 836, 1521, 1210, 1966, 3197, 1520, 2294, 2279, 2046, 5410, 5472, 1965, 6702, 13947, 10138, 12122, 16760, 7659, 22325, 16784, 13072, 36169, 17852, 15414, 69872, 23814, 16370, 46752
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.
LINKS
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.
MAPLE
N:= 60: # for a(1) .. a(N)
V:= Vector(N): count:= 0:
p:= 1:
for i from 1 while count < N do
p:= nextprime(p);
v:= (nextprime(2*p)-2*p+1)/2;
if v <= N and V[v] = 0 then V[v]:= i; count:= count+1; fi;
od:
convert(V, list); # Robert Israel, May 03 2025
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
Cf. A059787.
Sequence in context: A009908 A321643 A049935 * A327457 A025526 A301093
KEYWORD
nonn
AUTHOR
Zak Seidov, Oct 06 2002
EXTENSIONS
a(44)-a(45) from Bruno Berselli, Oct 03 2013
STATUS
approved