%I #16 Oct 16 2013 17:52:37
%S 1,5,8,14,20,23,29,33,35,48,50,53,63,74,75,83,89,90,113,114,116,119,
%T 120,131,134,140,153,155,173,174,183,186,200,204,209,215,216,219,230,
%U 243,245,251,284,285,293,296,299,300,303,320,321,323,326,329,338,359,363
%N a(n) is the largest number for which exactly n primes are bounded between a(n) and 2a(n) exclusively.
%C a(n) is the index of last occurrence of n in A060715. This calculation relies on the fact that Pi(2*m)-Pi(m) > m/(3*Log(m)) for m>=5. It can be shown that every integer >= 0 occurs in A060715, so there is no problem in finding the last occurrence.
%C A168421(n) = nextprime(a(n)), where nextprime(x) is the next prime > x. Note: some a(n) may be prime, therefore nextprime(x) not equal to x. - _John W. Nicholson_, Oct 11 2013
%D P. Ribenboim, The Little Book of Big Primes. Springer-Verlag, 1991, p. 140.
%H T. D. Noe, <a href="/A084139/b084139.txt">Table of n, a(n) for n = 0..1000</a>
%H Eric W. Weisstein, <a href="http://mathworld.wolfram.com/BertrandsPostulate.html">MathWorld: Bertrand's Postulate</a>
%F a(n) = floor((A104272(n)+1)/2) for n >= 1. - _John W. Nicholson_, Oct 11 2013
%F a(n) = A084140(n+1) - 1. - _John W. Nicholson_, Oct 11 2013
%e a(10) = 50 since ten primes last arise between 50 and 100: 53, 59, 61, 67, 71, 73, 79, 83, 89, 97.
%t nn = 100; t = Table[0, {nn}]; Do[m = PrimePi[2*n] - PrimePi[n]; If[0 < m <= nn, t[[m]] = n], {n, 15*nn}]; Join[{1}, t] (* _T. D. Noe_, Dec 31 2012 *)
%Y Cf. A060715, A060756, A084138, A084140, A084141, A084142.
%K nonn
%O 0,2
%A _Harry J. Smith_, May 15 2003