0
$\begingroup$

I am analyzing the complexity of an algorithm and the result is the sum of n products. Product 1 is the factorial. Product 2 is the factorial divided by 2. Product 3 is the factorial divided by 3 etc. Can we bound this in a most sophisticated way than the obvious n*(n!) ?

$\endgroup$
5
$\begingroup$

Your sum is $n!\sum _{i=1}^n \frac 1i=n!H_n$ where $H_n$ is the $n^{\text{th}}$ Harmonic number. It is about $\log n+ \gamma$, with $\gamma \approx 0.577$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.