login
A250622
a(n) = floor(n*log(prime(n)))-prime(n), n >= 1.
1
-2, -1, -1, 0, 0, 2, 2, 4, 5, 4, 6, 6, 7, 9, 10, 10, 10, 12, 12, 14, 17, 17, 18, 18, 17, 18, 22, 23, 27, 28, 23, 25, 25, 28, 26, 29, 30, 30, 32, 33, 33, 37, 34, 38, 40, 44, 40, 36, 38, 42, 45, 45, 49, 47, 48, 49, 49, 53, 54, 57, 61, 59, 53, 56, 60, 63, 57, 58, 56, 60, 63, 64, 64, 65, 66, 69, 70, 69
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
FORMULA
a(n) = floor(n*log(prime(n))) - prime(n) = A250621(n) - A000040(n).
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
Cf. A000040, A064658 (ceiling(prime(n) - n*log(n))), A250621 (floor(n*log(prime(n)))).
Sequence in context: A182748 A025879 A179854 * A212551 A125753 A185184
KEYWORD
sign,easy,changed
AUTHOR
Freimut Marschner, Dec 02 2014
STATUS
approved