A059316 Least integer m such that between m and 2m (including endpoints) there are exactly n primes.
1, 2, 7, 10, 16, 22, 27, 31, 36, 37, 51, 52, 55, 57, 70, 79, 87, 91, 96, 97, 100, 120, 121, 126, 135, 136, 142, 147, 157, 175, 177, 187, 190, 205, 210, 211, 217, 220, 222, 232, 246, 250, 255, 262, 289, 297, 300, 301, 304, 307, 310, 324, 327, 330, 331, 342, 346
Offset: 1
Examples
a(3)=7 because 7 is the least integer such that between 7 and 14 there are 3 primes.
Links
- T. D. Noe, Table of n, a(n) for n=1..1000
- A related page
- Wilkinson, Erdos' proof of Bertrand's postulate, MathForum(AT)Drexel.
Programs
-
Haskell
import Data.List (elemIndex) import Data.Maybe (mapMaybe) a059316 n = a059316_list !! n a059316_list = map (+ 1) $ mapMaybe (`elemIndex` a035250_list) [1..] -- Reinhard Zumkeller, Jan 05 2012
-
Mathematica
im[n_]:=Module[{m=1},While[PrimePi[2m]-(PrimePi[m-1])!=n,m++];m]; Array[ im,60] (* Harvey P. Dale, May 19 2012 *)
Comments