OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..448
Vaclav Kotesovec, Plot of a(n) / (n*n!) for n = 1..1000000
Mathoverflow, An asymptotic formula for a sum involving powers of floor functions, 2019.
FORMULA
a(n) ~ c * n * n!, where c = Sum_{j>=1} 1/(j^2*(j+1)) = Pi^2/6 - 1 = 0.644934... [proved by Harry Richman, see Mathoverflow link]
E.g.f.: -(1/(1-x)) * Sum_{k>0} (1 - x^k) * log(1 - x^k). - Seiichi Manyama, Jul 23 2022
MATHEMATICA
Table[n! * Sum[1/Floor[n/k], {k, 1, n}], {n, 1, 25}]
Table[n!*(Sum[(Floor[n/j] - Floor[n/(j + 1)])/j, {j, 1, n}]), {n, 1, 25}]
PROG
(PARI) a(n) = n!*sum(k=1, n, 1/(n\k)); \\ Michel Marcus, Jun 24 2021
(PARI) my(N=30, x='x+O('x^N)); Vec(serlaplace(-sum(k=1, N, (1-x^k)*log(1-x^k))/(1-x))) \\ Seiichi Manyama, Jul 23 2022
(Python)
from math import factorial, isqrt
def A345683(n): return (m:=factorial(n))*(n-1)+m//n+sum((q:=n//k)*(m//k-m//(k-1))+m//q for k in range(2, isqrt(n)+1)) # Chai Wah Wu, Oct 27 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Vaclav Kotesovec, Jun 23 2021
STATUS
approved