login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


Least integer m such that between m and 2m (including endpoints) there are exactly n primes.
4

%I #29 Sep 07 2023 07:09:44

%S 1,2,7,10,16,22,27,31,36,37,51,52,55,57,70,79,87,91,96,97,100,120,121,

%T 126,135,136,142,147,157,175,177,187,190,205,210,211,217,220,222,232,

%U 246,250,255,262,289,297,300,301,304,307,310,324,327,330,331,342,346

%N Least integer m such that between m and 2m (including endpoints) there are exactly n primes.

%C See A060756 for the case they are excluded. - _R. J. Mathar_, Nov 28 2007

%C A035250(a(n)) = n and A035250(m) <> n for m < a(n). - _Reinhard Zumkeller_, Jan 08 2012

%H T. D. Noe, <a href="/A059316/b059316.txt">Table of n, a(n) for n=1..1000</a>

%H <a href="http://www.trottermath.net/numthry/erdos.html">A related page</a> [Broken link]

%H [Warning: As of March 2018 this site appears to have been hacked. Proceed with great caution. The original content should be retrieved from the Wayback machine and added here. - _N. J. A. Sloane_, Mar 29 2018]

%H Wilkinson, <a href="https://web.archive.org/web/20181024055955/http://mathforum.org:80/library/drmath/view/51527.html">Erdos' proof of Bertrand's postulate</a>, MathForum(AT)Drexel.

%e a(3)=7 because 7 is the least integer such that between 7 and 14 there are 3 primes.

%t im[n_]:=Module[{m=1},While[PrimePi[2m]-(PrimePi[m-1])!=n,m++];m]; Array[ im,60] (* _Harvey P. Dale_, May 19 2012 *)

%o (Haskell)

%o import Data.List (elemIndex)

%o import Data.Maybe (mapMaybe)

%o a059316 n = a059316_list !! n

%o a059316_list = map (+ 1) $ mapMaybe (`elemIndex` a035250_list) [1..]

%o -- _Reinhard Zumkeller_, Jan 05 2012

%Y Cf. A035250, A060756.

%K nice,nonn

%O 1,2

%A _Felice Russo_, Jan 25 2001

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 21 08:46 EDT 2024. Contains 376084 sequences. (Running on oeis4.)