A230022 a(n) = |{the number of primes in the interval (k*n, (k+1)*n]: k = 0, 1, ..., n-1}|.
1, 1, 2, 2, 3, 3, 3, 4, 3, 4, 5, 5, 4, 5, 4, 5, 5, 6, 7, 6, 5, 6, 6, 6, 5, 5, 7, 6, 6, 7, 7, 6, 6, 7, 7, 8, 9, 8, 9, 9, 8, 8, 8, 9, 8, 9, 9, 8, 10, 10, 9, 10, 9, 10, 10, 10, 10, 11, 10, 10, 9, 10, 9, 11, 10, 11, 11, 11, 11, 11, 11, 11, 10, 12, 11, 10, 11, 12, 13, 11
Offset: 1
Keywords
Examples
a(1) = 1 since the interval (0,1*1] contains no prime, and the set {0} has cardinaly 1. a(3) = 2 since the intervals (0, 1*3], (1*3, 2*3], (2*3, 3*3] contain exactly 2, 1, 1 primes respectively, and the set {2, 1, 1} has cardinality 2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..4000
- 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_]:=Length[Union[Table[d[k,n],{k,0,n-1}]]] Table[a[n],{n,1,80}]
Comments