A120936 Number of primes in the interval [n,n+log(n)].
0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 2, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 2, 2, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 2, 2, 2, 1, 1, 0, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2
Offset: 1
Keywords
Links
- T. D. Noe, Table of n, a(n) for n = 1..5000
- K. Soundararajan, The distribution of prime numbers
Programs
-
Mathematica
Table[Length[Select[Range[n,n+Log[n]],PrimeQ]], {n,150}]
-
PARI
a(n)=sum(k=n,n+log(n),isprime(k)) \\ Charles R Greathouse IV, Apr 17 2012
Comments