OFFSET
2,1
COMMENTS
prime(n) ~ n*log(n) + n - n*log(log(n)) - (n/log(n))*(log(log(n)) - 2) + (log(log(n)) - 6)*n*log(log(n))/(2*log(n)^2).
The first negative term is a(214) = -2. - Jason Yuen, Feb 17 2025
REFERENCES
M. Cipolla, La determinazione asintotica dell'n-mo numero primo, Rend. d. R. Acc. di sc. fis. e mat. di Napoli, s. 3, VIII (1902), pp. 132-166.
LINKS
Michel Marcus, Table of n, a(n) for n = 2..10000
Pierre Dusart, Estimates of Some Functions Over Primes without R.H., arXiv:1002.0442 [math.NT], 2010.
Wikipedia, Prime number theorem
MATHEMATICA
Table[Floor[Prime[n]-n*Log[n]+n-n*Log[Log[n]]- (n/Log[n]) (Log[Log[n]]-2)+(Log[Log[n]]-6)*n*Log[Log[n]]/(2*Log[n]^2)], {n, 2, 100}]
PROG
(PARI) a(n) = floor(prime(n)-n*log(n) + n - n*log(log(n)) - (n/log(n))*(log(log(n)) - 2) + (log(log(n)) - 6)*n*log(log(n))/(2*log(n)^2)); \\ Michel Marcus, Feb 22 2025
CROSSREFS
KEYWORD
sign
AUTHOR
José María Grau Ribas, Jan 14 2012
STATUS
approved