OFFSET
1,1
COMMENTS
Since n*log(prime(n)) > prime(n), n >= 4 and ceiling(prime(n) - n*log(n)) < prime(n), then n*log(n) < prime(n) < n*log(prime(n)), n >= 4. This inequality is included in the prime number theorem PNT. Remark: a(n) >= 0 for n >=4 otherwise a(n) < 0.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
EXAMPLE
n = 1, a(1) = floor(1*0.6931...) - 2 = 0 - 2 = -2;
n = 5, a(5) = floor(5*2.3978...) - 11 = floor( 11.9894...) - 11 = 11 - 11 = 0;
n = 6, a(6) = floor(6*2.5649...) - 13 = floor(15.3896...) - 13 = 15 - 13 = 2.
MATHEMATICA
a250622[n_Integer] := Table[Floor[i*Log[Prime[i]]] - Prime[i], {i, n}]; a250622[121] (* Michael De Vlieger, Dec 11 2014 *)
PROG
(PARI) vector(100, n, floor(n*log(prime(n))-prime(n))) \\ Derek Orr, Dec 13 2014
CROSSREFS
KEYWORD
sign,easy,changed
AUTHOR
Freimut Marschner, Dec 02 2014
STATUS
approved