OFFSET
1,1
COMMENTS
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.
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.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
EXAMPLE
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.
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}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Nov 18 2013
STATUS
approved