A053622 a(n) = round( n/log(n) - pi(n) ).
2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, -1, -1, -2, -1, -1, -1, -2, -1, -1, -1, -1, -1, -1, -1, -2, -2, -2, -1, -1, -1, -2, -2, -1, -1, -2, -2, -3, -2, -2, -2, -3, -3, -2, -2, -2, -2, -3, -2, -2, -2, -2, -2, -3, -2, -3, -3, -3, -3, -2, -2, -3, -3, -3, -3, -3, -3
Offset: 2
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 2..1000
- C. K. Caldwell, How Many Primes Are There?
Programs
-
Magma
[Round(n/Log(n) - #PrimesUpTo(n)): n in [2..80]]; // G. C. Greubel, May 17 2019
-
Mathematica
Table[Round[n/Log[n] - PrimePi[n]], {n,2,80}] (* G. C. Greubel, Apr 20 2017 *)
-
PARI
vector(80, n, n++; round(n/log(n) - primepi(n)) ) \\ G. C. Greubel, May 17 2019
-
Sage
[round(n/log(n) - prime_pi(n)) for n in (2..80)] # G. C. Greubel, May 17 2019