OFFSET
1,8
COMMENTS
Conjecture: a(n) > 0 for all n > 6, and a(n) = 1 only for n = 5, 7, 10, 11, 12, 19, 22, 30, 34, 44, 46, 72, 142.
I have verified the conjecture for n up to 10^8.
Verified for n up to 10^9. - Mauro Fiorentini, Jul 05 2023
Conjecture verified for n < 1.2 * 10^12. - Jud McCranie, Aug 26 2023
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Conjectures involving primes and quadratic forms, arXiv:1211.1588 [math.NT], 2012-2015.
EXAMPLE
a(19) = 1 since 13, 19-(13-1) = 7 and 19+(13-1) = 31 are all prime.
a(142) = 1 since 41, 142-(2*41-1) = 61 and 142+(2*41-1) = 223 are all prime.
MATHEMATICA
Do[r=0; Do[If[PrimeQ[n-(3+(-1)^n)/2*Prime[k]+1]&&PrimeQ[n+(3+(-1)^n)/2*Prime[k]-1], r=r+1], {k, 1, PrimePi[2n/(3+(-1)^n)]}]; Print[n, " ", r]; Continue, {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Aug 27 2015
STATUS
approved