0

$$\sum_{m=p}^t \left ( \frac{x}{100 \cdot m} \right )$$

Right now I have this, $x$ is fixed(it will never change), the function is $f(n) = \frac{x}{100n}$ so its summation from $n=p$ to $n=t$, where the formula would be $f(n)$, how can I find this final formula?

The formula will be used on a software and its purpose is to have a low time on math calc, so it is necessary to have the variables $(t,p)$

HallaSurvivor
  • 38,115
  • 4
  • 46
  • 87
  • 1
    so you need $\frac{x}{100}\cdot\displaystyle\sum_n^t{\dfrac{1}{m}}$, hummm there is not a closed formula for the sum you are asking, you will have to compute it by recursion – L F Mar 03 '22 at 22:36
  • Welcome to MSE! I've edited your post to use mathjax (which is searchable) rather than an image (which isn't) so that future users of the site can have an easier time finding this. in the future you should do the same ^_^ – HallaSurvivor Mar 03 '22 at 22:48
  • There is no closed form. What you want is called the harmonic sum, usually denoted by $H_n=\sum_{k=1}^n 1/k$. There are asymptotic formulas accurate for not small n. – marty cohen Mar 04 '22 at 02:37
  • @martycohen. There are some rather accurate approximations and tight bounds. The one I give (not published) is now quite old. – Claude Leibovici Mar 04 '22 at 05:33

1 Answers1

1

$$\sum_{m=p}^t \left ( \frac{x}{100 \, m} \right )=\frac{x}{100}\sum_{m=p}^t \frac1m=\frac{x}{100}\left(H_t-H_{p-1}\right)$$ where, as already said in comments, appear the harmonic numbers.

For a fast evaluation of $H_n$, beside an infinite series, there are quite many approximations. One of mine, a continuation of the work done by D. DeTemple and S.-H. Wang, is $$H_n=\log \left(n+\frac{1}{2}\right)+\gamma+\frac{1}{24 \left(n+\frac{1}{2}\right)^2+\Lambda }$$ where $$\Lambda= \frac{21}{5}-\frac{2071}{1400 \left(n+\frac{1}{2}\right)^2}+\frac{13879}{8000 \left(n+\frac{1}{2}\right)^4}-\frac{1810165549}{517440000 \left(n+\frac{1}{2}\right)^6}$$ the asymptotic error estimate being $$\frac{44683928057}{2460057600000\, n^{12}}$$

The following table shows the results for the first values of $n$ $$\left( \begin{array}{ccc} n & \text{approximation} & \text{exact} \\ 1 & 1.00004848470 & 1.00000000000 \\ 2 & 1.50000018166 & 1.50000000000 \\ 3 & 1.83333333731 & 1.83333333333 \\ 4 & 2.08333333355 & 2.08333333333 \\ 5 & 2.28333333335 & 2.28333333333 \\ 6 & 2.45000000000 & 2.45000000000 \end{array} \right)$$