A238281 a(n) = |{0 < k < n: the two intervals (k*n, (k+1)*n) and ((k+1)*n, (k+2)*n) contain the same number of primes}|.
0, 1, 2, 1, 2, 3, 3, 1, 5, 2, 4, 4, 8, 3, 7, 4, 4, 4, 2, 3, 7, 3, 10, 4, 12, 7, 7, 15, 7, 9, 8, 5, 8, 9, 11, 8, 8, 10, 8, 4, 10, 10, 10, 11, 7, 10, 8, 11, 8, 8, 9, 9, 8, 11, 7, 8, 13, 10, 8, 14, 13, 4, 14, 8, 11, 12, 14, 12, 8, 10, 16, 12, 16, 12, 14, 19, 11, 14, 8, 9
Offset: 1
Keywords
Examples
a(8) = 1 since each of the two intervals (7*8, 8*8) and (8*8, 9*8) contains exactly two primes.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..5000
- Z.-W. Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014
Programs
-
Mathematica
d[k_,n_]:=PrimePi[(k+1)*n]-PrimePi[k*n] a[n_]:=Sum[If[d[k,n]==d[k+1,n],1,0],{k,1,n-1}] Table[a[n],{n,1,80}]
Comments