login
Least prime p < n + 5 with n + (p-1)*(p-3)/8 prime, or 0 if such a prime p does not exist.
1

%I #9 Nov 18 2013 21:38:00

%S 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,

%T 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,

%U 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

%N Least prime p < n + 5 with n + (p-1)*(p-3)/8 prime, or 0 if such a prime p does not exist.

%C Conjecture: a(n) > 0 for all n > 0. Moreover, for any integer n > 1 there exists a prime p < 2*sqrt(n)*log(7n) such that n + (p-1)*(p-3)/8 is prime.

%C This implies that any integer n > 1 can be written as (p-1)/2 + q with q a positive integer, and p and (p^2-1)/8 + q both prime.

%H Zhi-Wei Sun, <a href="/A232109/b232109.txt">Table of n, a(n) for n = 1..10000</a>

%e 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.

%t Do[Do[If[PrimeQ[n+(Prime[k]-1)(Prime[k]-3)/8],Goto[aa]],{k,1,PrimePi[n+4]}];

%t Print[n," ",0];Label[aa];Continue,{n,1,100}]

%Y Cf. A000040, A185636, A204065, A227898, A228425, A231201, A231557.

%K nonn

%O 1,1

%A _Zhi-Wei Sun_, Nov 18 2013