OFFSET
1,1
COMMENTS
The function log gives the natural logarithm (to base e).
See A059111 for the sequence a(n) = floor(prime(n)-n*log(n)).
LINKS
Michel Lagneau, Table of n, a(n) for n = 1..10000
EXAMPLE
a(8) = 0 because floor(prime(8)-(8+1)*log(8)) = floor(19 -9*2.07944154...) = floor(.28502612...) = 0.
MAPLE
with(numtheory):
for n from 1 to 200 do:
p:=floor(evalf(ithprime(n)-(n+1)*ln(n))): printf(`%d, `, p):
od:
MATHEMATICA
Table[Floor[Prime[n]-(n+1)Log[n]], {n, 100}]
PROG
(Magma) [Floor(NthPrime(n)-(n+1)*Log(n)): n in [1..80]]; // Vincenzo Librandi, Oct 16 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Oct 16 2014
STATUS
approved