login
A339919
a(n) = Sum_{k=1..n} (floor(3*n/k) - 3*floor(n/k)).
2
0, 0, 0, 1, 1, 3, 1, 5, 4, 4, 5, 9, 5, 7, 10, 10, 8, 13, 8, 16, 13, 11, 15, 19, 14, 15, 18, 21, 18, 22, 17, 23, 22, 22, 26, 30, 18, 24, 29, 31, 28, 31, 26, 32, 33, 29, 32, 42, 32, 35, 34, 36, 39, 41, 40, 42, 37, 40, 41, 53, 38, 44, 49, 47, 47, 47, 43, 53, 52
OFFSET
0,6
COMMENTS
In general, for m>=1, Sum_{k=1..n} (floor(m*n/k) - m*floor(n/k)) ~ m*n * (log(m) - H(m) + 1), where H(m) = A001008(m)/A002805(m) is the m-th harmonic number.
LINKS
FORMULA
a(n) ~ (3*log(3) - 5/2) * n.
MATHEMATICA
Table[Sum[Floor[3*n/k] - 3*Floor[n/k], {k, 1, n}], {n, 0, 100}]
PROG
(PARI) a(n) = sum(k=1, n, floor(3*n/k) - 3*floor(n/k)); \\ Michel Marcus, Dec 23 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Vaclav Kotesovec, Dec 23 2020
STATUS
approved