OFFSET
1,2
COMMENTS
a(n) closely approximates the number of primes < n^2, that is, A038107(n) = Pi(n^2).
In fact, the sum is as good as Li(n^2). For n = 10^9,
a(n) = 24739954333817884.
Pi(n^2) = 24739954287740860 = A006880(18).
R(n^2) = 24739954284239494 = A057793(18).
Now x/(log(x)-1) is a much better approximation of Pi(x) than x/log(x).
10^18/(log(10^18)-1) = 24723998785919976 and
10^18/log(10^18) = 24127471216847323.
Ironically though, a(n) = Sum_{x=2..n} x/(log(x)-1) is far from Pi(n^2), see A058290.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
a(10^n) = A163521(n).
EXAMPLE
For n = 10, floor(Sum_{x=2..n} x/log(x)) = 30, the 10th term.
MATHEMATICA
Table[Floor[Sum[j/Log[j], {j, 2, n}]], {n, 1, 50}] (* G. C. Greubel, Jul 27 2017 *)
Join[{0}, Floor[Accumulate[Table[x/Log[x], {x, 2, 60}]]]] (* Harvey P. Dale, May 22 2021 *)
PROG
(PARI) nthsum(n) = for(j=1, n, print1(floor(sum(x=2, j, x/log(x)))", "));
CROSSREFS
KEYWORD
nonn
AUTHOR
Cino Hilliard, Jul 30 2009
EXTENSIONS
Offset corrected, definition detailed, 7 references to other sequences added by R. J. Mathar, Aug 29 2009
STATUS
approved