OFFSET
0,2
COMMENTS
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.
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
REFERENCES
P. Ribenboim, The Little Book of Big Primes. Springer-Verlag, 1991, p. 140.
LINKS
T. D. Noe, Table of n, a(n) for n = 0..1000
Eric W. Weisstein, MathWorld: Bertrand's Postulate
FORMULA
a(n) = floor((A104272(n)+1)/2) for n >= 1. - John W. Nicholson, Oct 11 2013
a(n) = A084140(n+1) - 1. - John W. Nicholson, Oct 11 2013
EXAMPLE
a(10) = 50 since ten primes last arise between 50 and 100: 53, 59, 61, 67, 71, 73, 79, 83, 89, 97.
MATHEMATICA
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Harry J. Smith, May 15 2003
STATUS
approved