OFFSET
1,6
COMMENTS
Conjecture: a(n) > 0 for all n > 3, and a(n) = 1 only for n = 4, 5, 17.
We have verified this for n up to 3*10^5.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Zhi-Wei Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014.
EXAMPLE
a(4) = 1 since 3 and pi(4*(3+1)/2) - pi(4*(3-1)/2) = pi(8) - pi(4) = 4 - 2 = 2 are both prime.
a(5) = 1 since 5 and pi(5*(5+1)/2) - pi(5*(5-1)/2) = pi(15) - pi(10) = 6 - 4 = 2 are both prime.
a(17) = 1 since 11 and pi(17*(11+1)/2) - pi(17*(11-1)/2) = pi(102) - pi(85) = 26 - 23 = 3 are both prime.
MATHEMATICA
p[n_, k_]:=PrimeQ[PrimePi[n*(Prime[k]+1)/2]-PrimePi[n*(Prime[k]-1)/2]]
a[n_]:=Sum[If[p[n, k], 1, 0], {k, 2, PrimePi[n]}]
Table[a[n], {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 16 2014
STATUS
approved