login
floor(prime(n) - n*log(n) - n*log(log(n)) + n).
4

%I #12 Jul 07 2024 13:44:37

%S 4,4,4,5,4,5,4,5,7,6,8,8,6,6,8,10,7,9,9,6,8,7,8,12,11,8,7,5,4,13,12,

%T 13,10,15,12,12,13,12,13,13,10,15,11,10,7,13,20,18,15,13,14,10,14,15,

%U 15,15,12,12,10,7,11,19,17,13,11,20,20,24,20,18,18,20,20,20,18,18,20,18

%N floor(prime(n) - n*log(n) - n*log(log(n)) + n).

%H C. K. Caldwell, <a href="http://www.utm.edu/research/primes/howmany.shtml">How Many Primes Are There?</a>

%e a(10000) = floor[104729 - 92103.403 - 22203.268 + 10000] = floor[422.328] = 422.

%t Table[Floor[Prime[n]-n Log[n]-n Log[Log[n]]+n],{n,2,80}] (* _Harvey P. Dale_, Jul 10 2023 *)

%o (PARI) vector(100,n,floor(prime(n+1) - (n+1)*log(n+1) - (n+1)*log(log(n+1))+n+1)) \\ _Derek Orr_, Oct 27 2014

%Y Cf. A000040, A059111.

%K nonn,easy

%O 2,1

%A _Henry Bottomley_, Jan 04 2001