A232109 Least prime p < n + 5 with n + (p-1)*(p-3)/8 prime, or 0 if such a prime p does not exist.
5, 3, 3, 5, 3, 5, 3, 7, 11, 5, 3, 5, 3, 7, 17, 5, 3, 5, 3, 7, 11, 5, 3, 23, 17, 7, 11, 5, 3, 5, 3, 13, 11, 7, 19, 5, 3, 7, 17, 5, 3, 5, 3, 7, 17, 5, 3, 23, 11, 7, 11, 5, 3, 23, 17, 7, 11, 5, 3, 5, 3, 31, 11, 7, 19, 5, 3, 7, 11, 5, 3, 5, 3, 13, 17, 7, 19, 5, 3, 7, 17, 5, 3, 23, 17, 7, 11, 5, 3, 29, 11, 13, 11, 7, 19, 5, 3, 7, 11, 5
Offset: 1
Keywords
Examples
a(1) = 5 since neither 1 + (2-1)*(2-3)/8 = 7/8 nor 1 + (3-1)*(3-3)/8 = 1 is prime, but 1 + (5-1)*(5-3)/8 = 2 is prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
Do[Do[If[PrimeQ[n+(Prime[k]-1)(Prime[k]-3)/8],Goto[aa]],{k,1,PrimePi[n+4]}]; Print[n," ",0];Label[aa];Continue,{n,1,100}]
Comments