Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Since

$$ \lim_{n\to\infty} \sum_{i=1}^n {1 \over i} = \infty $$

it should be possible to find the $n$ where the sum reaches a certain number.

Given $c$ determine $k$ where

$$ \sum_{i=1}^k {1 \over i} < c \leq \sum_{i=1}^{k+1} {1 \over i} $$

Approximate solution is also OK if you can determine whether $k$ is even or odd.

share|improve this question
1  
This page helps you with at least an approximate solution: $k\approx e^{c-\gamma}$ –  Arthur Jun 18 '13 at 8:37
    
It is unclear to me how precise that is. Can I just round that value down or will that fail at some point? –  Ole Tange Jun 18 '13 at 8:49
3  
Any approximation will fail for suitably-chosen $c$. –  Robert Israel Jun 18 '13 at 9:00
add comment

1 Answer

If $S_n = \sum_{i=1}^n 1/i$, we have $L(n) < S_n < U(n)$ where $$ \eqalign{L(n) &= \ln(n) + \gamma + \frac{1}{2n} - \frac{1}{12 n^2}\cr U(n) &= \ln(n) + \gamma + \frac{1}{2n}\cr} $$

Now $U(x) = c$ for $$x = -\dfrac{1}{2 W(-\exp(\gamma-c)/2)}$$ where $W$ is the Lambert W function. If $n = \lfloor x \rfloor$, you have $U(n) \le c \le U(n+1)$. The difference between $L(n+1)$ and $U(n+1)$ is only $1/(12 (n+1)^2)$, while the difference between $U(n)$ and $U(n+1)$ is approximately $1/(n+1)$ which is much larger if $n$ is large. So for "most" $c$, you'll also have $c \le L(n+1)$, and therefore $S_{n} < c < S_{n+1}$. But if you're unlucky enough that $c > L(n+1)$, all you have is $L(n+1) < c < U(n+1)$. You might then try a better approximation.

For example, with $c = 10$, I get $x \approx 12366.46810$ so $n = 12366$, and $L(12367) \approx 10.00004301 > c$, so $S_{12366} < 10 < S_{12367}$.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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