A185192 Number of primes less than 2^n.
0, 2, 4, 6, 11, 18, 31, 54, 97, 172, 309, 564, 1028, 1900, 3512, 6542, 12251, 23000, 43390, 82025, 155611, 295947, 564163, 1077871, 2063689, 3957809, 7603553, 14630843, 28192750, 54400028, 105097565, 203280221, 393615806, 762939111, 1480206279, 2874398515
Offset: 1
Examples
a(7) = 31 because prime(31) = 127, prime(32) = 131, and 127 < 2^7 < 131.
Links
- David Baugh, Table of n, a(n) for n = 1..90 (terms n = 1..81 from Charles R Greathouse IV).
- Wikipedia, Prime-counting function.
Programs
-
Mathematica
PrimePi[2^Range[32] - 1] (* Alonso del Arte, May 05 2019 *)
-
PARI
a(n)=primepi(2^n-1) \\ Charles R Greathouse IV, Dec 04 2014
Comments