OFFSET
1,6
COMMENTS
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..3500
Z.-W. Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014
EXAMPLE
a(17) = 1 since the interval (9*17, 10*17] contains exactly 3 primes with 3 prime, and the interval (10*17, 11*17] contains exactly 3 primes with 3 prime.
MATHEMATICA
d[k_, n_]:=PrimePi[k*n]-PrimePi[(k-1)n]
a[n_]:=Sum[If[PrimeQ[d[k, n]]&&PrimeQ[d[k+1, n]], 1, 0], {k, 1, n-1}]
Table[a[n], {n, 1, 80}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 22 2014
STATUS
approved