# What is the integer part of the sum of the reciprocals of the first $2017$ positive integers?

Finding value of $\displaystyle \bigg\lfloor 1+\frac{1}{2}+\frac{1}{3}+\cdots \cdots \cdots +\frac{1}{2017}\bigg\rfloor$, where $\lfloor x \rfloor = x - \{x\}$.

Attempt: taking $\displaystyle f(x) = \frac{1}{x}$, then $\displaystyle \int^{2018}_{1}\frac{1}{x}dx=\ln(2018) <\displaystyle 1+\frac{1}{2}+\frac{1}{3}+\cdots \cdots \cdots +\frac{1}{2017}$

could some help how i find upper bound and integer part of $\displaystyle 1+\frac{1}{2}+\frac{1}{3}+\cdots \cdots \cdots +\frac{1}{2017}$

• From $$\frac{1}{k+1} \le \int_{k}^{k+1} \frac{dt}{t} \le \frac{1}{k}$$ you get $$\sum_{k = 1}^n \frac{1}{k+1} \le \int_{1}^{n+1} \frac{dt}{t} \le \sum_{k = 1}^n \frac{1}{k}$$ So $$\underbrace{\int_{1}^{n+1} \frac{dt}{t}}_{\ln(n+1)} \le \sum_{k = 1}^n \frac{1}{k} \le 1 + \underbrace{\int_{1}^{n} \frac{dt}{t}}_{\ln(n)}$$ Unfortunately, this approximation isn't sharp enough, because $\ln(2018) < 8 < \ln(2017)+1$. – Joel Cohen Mar 27 '17 at 11:12
• But the slightly better approximation $H_n\approx \ln(n)+\gamma$ is sufficient here. – Peter Mar 27 '17 at 11:15
A very good approximation to $$H_n=\sum_{j=1}^n \frac{1}{j}$$ is $$\ln(n)+\gamma+\frac{1}{2n}$$ This gives about $8.19$, so the integer part is $8$
• If you are extremely unlucky that the approximation is very very near to an integer, the formula might give the wrong integer part for some $n$, but here everything is alright. The error is about $2\cdot 10^{-8}$, which is far smaller than what we would need. – Peter Mar 27 '17 at 11:08
This tells us that : $$8.18682 < \log(2017) + \gamma + \frac{1}{2\cdot (2017+1)} < \sum_{i=1}^{2017} \frac{1}{i} < \log(2017) + \gamma + \frac{1}{2\cdot 2017} < 8.18684$$