A085956 Smallest prime p such that (2n)*p +1 and (p-1)/(2n) are prime, or 0 if no such prime exists.
5, 13, 13, 17, 31, 61, 239, 0, 127, 41, 0, 73, 131, 0, 61, 1889, 0, 397, 419, 0, 211, 89, 0, 97, 101, 0, 163, 113, 0, 181, 2543, 0, 463, 2789, 211, 5689, 149, 0, 547, 881, 0, 1093, 173, 0, 271, 9293, 0, 673, 491, 0, 1123, 14249, 0, 10909, 3191, 0, 229, 1973, 0, 241
Offset: 1
Keywords
Examples
a(5) = 31 as (2*5)*31 + 1= 311 as well as (31-1)/10 = 3 are primes.
Programs
-
Mathematica
f[n_] := Block[{k = 1}, While[k < 10^12 && ( !PrimeQ[k] || !PrimeQ[2*n*k + 1] || !PrimeQ[(k - 1)/(2n)] ), k += 2n]; If[k >= 10^12, 0, k]]; Table[ f[n], {n, 1, 61}]
Extensions
Corrected by Labos Elemer, Jul 17 2003
Edited and extended by Robert G. Wilson v, Jul 18 2003
Comments