%I #28 Nov 12 2024 09:04:36
%S -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,
%T 22,23,27,28,23,25,25,28,26,29,30,30,32,33,33,37,34,38,40,44,40,36,38,
%U 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
%N a(n) = floor(n*log(prime(n)))-prime(n), n >= 1.
%C 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.
%H Michael De Vlieger, <a href="/A250622/b250622.txt">Table of n, a(n) for n = 1..10000</a>
%F a(n) = floor(n*log(prime(n))) - prime(n) = A250621(n) - A000040(n).
%e n = 1, a(1) = floor(1*0.6931...) - 2 = 0 - 2 = -2;
%e n = 5, a(5) = floor(5*2.3978...) - 11 = floor( 11.9894...) - 11 = 11 - 11 = 0;
%e n = 6, a(6) = floor(6*2.5649...) - 13 = floor(15.3896...) - 13 = 15 - 13 = 2.
%t a250622[n_Integer] := Table[Floor[i*Log[Prime[i]]] - Prime[i], {i, n}]; a250622[121] (* _Michael De Vlieger_, Dec 11 2014 *)
%o (PARI) vector(100,n,floor(n*log(prime(n))-prime(n))) \\ _Derek Orr_, Dec 13 2014
%Y Cf. A000040, A064658 (ceiling(prime(n) - n*log(n))), A250621 (floor(n*log(prime(n)))).
%K sign,easy,changed
%O 1,1
%A _Freimut Marschner_, Dec 02 2014