cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A059316 #31 Jun 05 2025 13:44:58
%S A059316 1,2,7,10,16,22,27,31,36,37,51,52,55,57,70,79,87,91,96,97,100,120,121,
%T A059316 126,135,136,142,147,157,175,177,187,190,205,210,211,217,220,222,232,
%U A059316 246,250,255,262,289,297,300,301,304,307,310,324,327,330,331,342,346
%N A059316 Least integer m such that between m and 2m (including endpoints) there are exactly n primes.
%C A059316 See A060756 for the case they are excluded. - _R. J. Mathar_, Nov 28 2007
%C A059316 A035250(a(n)) = n and A035250(m) <> n for m < a(n). - _Reinhard Zumkeller_, Jan 08 2012
%H A059316 T. D. Noe, <a href="/A059316/b059316.txt">Table of n, a(n) for n=1..1000</a>
%H A059316 <a href="http://www.trottermath.net/numthry/erdos.html">A related page</a>
%H A059316 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 A059316 a(3)=7 because 7 is the least integer such that between 7 and 14 there are 3 primes.
%t A059316 im[n_]:=Module[{m=1},While[PrimePi[2m]-(PrimePi[m-1])!=n,m++];m]; Array[  im,60]  (* _Harvey P. Dale_, May 19 2012 *)
%o A059316 (Haskell)
%o A059316 import Data.List (elemIndex)
%o A059316 import Data.Maybe (mapMaybe)
%o A059316 a059316 n = a059316_list !! n
%o A059316 a059316_list = map (+ 1) $ mapMaybe (`elemIndex` a035250_list) [1..]
%o A059316 -- _Reinhard Zumkeller_, Jan 05 2012
%Y A059316 Cf. A035250, A060756.
%K A059316 nice,nonn
%O A059316 1,2
%A A059316 _Felice Russo_, Jan 25 2001