A238278 a(n) = |{0 < k < n: the number of primes in the interval ((k-1)*n, k*n] and the number of primes in the interval (k*n, (k+1)*n] are both prime}|.
0, 0, 0, 1, 1, 3, 3, 2, 7, 6, 8, 4, 9, 4, 9, 8, 1, 1, 3, 5, 4, 6, 3, 4, 4, 6, 3, 11, 8, 8, 7, 7, 12, 9, 4, 8, 9, 12, 8, 12, 8, 7, 6, 7, 7, 9, 4, 8, 9, 11, 5, 6, 3, 11, 2, 5, 14, 8, 8, 11, 2, 1, 11, 4, 6, 4, 5, 4, 1, 9, 5, 2, 10, 5, 4, 9, 10, 11, 6, 7
Offset: 1
Keywords
Examples
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.
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
Programs
-
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}]
Comments