login
A051899
Smallest prime p such that (p-1)/(2*n) is also a prime.
2
5, 13, 13, 17, 31, 37, 29, 113, 37, 41, 67, 73, 53, 197, 61, 97, 103, 73, 191, 281, 127, 89, 139, 97, 101, 157, 109, 113, 1103, 181, 311, 193, 199, 137, 211, 937, 149, 229, 157, 241, 1559, 421, 173, 617, 181, 277, 283, 193, 197, 701, 307, 313, 743, 541, 331
OFFSET
1,1
LINKS
FORMULA
(a(n)-1)/2n = A051686(n), the smallest 2k-Germain primes.
EXAMPLE
a(2) = 13 because (13 - 1)/4 = 3 = A051686(2);
a(3) = 13 as well, because (13 - 1)/6 = 2 = A051686(3);
a(8) = 113 because (113 - 1)/16 = 7 is a prime.
PROG
(PARI) isp(q) = (denominator(q)==1) && isprime(q);
a(n) = {my(p = 2); while (!isp((p-1)/(2*n)), p = nextprime(p+1)); p; } \\ Michel Marcus, May 29 2018
(PARI) a(n) = forprime(p = 2, oo, q = 2 * p * n + 1; if(isprime(q), return(q))) \\ David A. Corneth, May 29 2018
CROSSREFS
Sequence in context: A320814 A274302 A274300 * A085956 A232610 A235337
KEYWORD
nonn,easy
AUTHOR
Labos Elemer, Dec 16 1999
STATUS
approved