# $n$ be the smallest positive integer such that $1+ \frac{1}{2} + \frac{1}{3} + \frac {1}{4}+\cdots \geq 4$.

$$n$$ be the smallest positive integer such that $$1+ \frac{1}{2} + \frac{1}{3} +\frac14+\cdots \geq 4$$.

My Attempt : I can show that $$\log(n+1) \leq 1+ \frac{1}{2} + \frac{1}{3} + \frac {1}{4} +\cdots+ \frac {1}{n}$$. And by using this inequality I can say that the smallest number will be less than $$54$$. But I can not find the smallest number.

• What about computing the sum up to $n = 53$? – Paul Frost Dec 11 '19 at 11:08
• How do yo compute sum up to 53?@PaulFrost – cmi Dec 11 '19 at 11:09
• In fact, quick calculations show that $n=31$ – Shailesh Dec 11 '19 at 11:11
• how you are calculating?@Shailesh – cmi Dec 11 '19 at 11:12
• How about $1+1/2+\ln(n+1)-\ln3$ – Empy2 Dec 11 '19 at 11:13

Since I am receiving a lot of flack for my poor use of inequalities, I will try to improve my method. First, note that you are analyzing the Harmonic Series $$H_n$$ and: $$H_n \approx ln(n)+\gamma$$ However, $$H_n < ln(n) +\gamma$$ For all $$n$$. Luckily, $$H_n \approx ln(n) +\gamma - \frac{1}{n}$$ and $$H_n > ln(n) +\gamma - \frac{1}{n}$$ for all $$n$$, so we have $$ln(n) +\gamma + \frac{1}{n} If you want to see just how good these approximations are, look at them all graphed: https://www.desmos.com/calculator/a5ibmgvsdy

We would like to show for which the smalles value of $$n$$, $$H_n \leq 4$$ so lets solve both sides of the equality for $$4$$. $$4 $$4- \gamma < ln(n)$$ $$e^{4-\gamma} $$30.6546491214 \lessapprox n$$ Now for the other side $$ln(n) +\gamma - \frac{1}{n}<4$$ $$ln(n)-\frac{1}{n}<4-\gamma$$ And after analyzing the graph of $$ln(n) + \frac{1}{n}$$ (since $$n$$ isn't separable) $$n \lessapprox 31.6$$ So finally we have $$30.6546491214\lessapprox n \lessapprox 31.6$$ Therefore if $$n$$ is an integer, we can approximate $$H_{31} \geq 4$$

I put this into Desmos for you as well so you can verify it is true: https://www.desmos.com/calculator/ttjyfn6ph3

• How do you switch from $\approx$ to $\ge$ ? – user65203 Dec 11 '19 at 13:46
• In fact, $\ln(n)+\gamma<H_n$ for all $n$. Your $\gtrapprox$ does not hold. We even have $\lceil\ln(11)+\gamma\rceil<\lceil H_{11}\rceil$. – user65203 Dec 11 '19 at 13:50
• That doesn't allow you to write wrong inequalities. And as you are looking for a near-integer, the approximation has high chances to be off. – user65203 Dec 11 '19 at 13:55
• Do what you want but don't leave the wrong inequalities. – user65203 Dec 11 '19 at 14:30
• Grrrr, you still leave the wrong inequality, despite warnings by two guys ! – user65203 Dec 11 '19 at 18:59

Not assuming as much knowledge about the Harmonic series as the other answers, we can also do an integral approximation by Riemann sum.

Since $$f(x) = 1/x$$ is monotonic decreasing

$$\sum_{k=1}^N 1/k \approx 1+\int_{1}^{N}{\frac{1}x dx} = 1+\left[\log(x)\right]_1^N = \log(N)-\log(1)+1 = 4$$

But because of systematic underestimation due to the monotonic nature of our log function we might as well choose one displaced by one step and get systematic overestimation. The mean value of these will be $$(\exp(3)+\exp(3+1))/2 \approx 37$$

But the nature of this mean involving exponential functions, a geometric mean might be more suitable than an arithmetic mean:

$$\sqrt{e^3 \cdot e^4} = e^{3.5}\approx 33$$

The real value appears to be $$31$$ or $$32$$.

• I can not understand this --- $$\sum_{k=1}^N 1/k \approx 1+\int_{1}^{N}{\frac{1}x dx} = 1+\left[\log(1+x)\right]_1^N = log(N+1)-log(2)+1 = 4$$ – cmi Dec 11 '19 at 11:40
• @cmi I added a link to Riemann sum technique. – mathreadler Dec 11 '19 at 11:43
• I know Riemann sum but I can not connect this with the Riemann sum.. I think You have made some mistake...@mathreadler – cmi Dec 11 '19 at 11:56
• Some problem in the integration as well.@mathreadler – cmi Dec 11 '19 at 12:18
• Of course you can. This is first calculus class level stuff. – mathreadler Dec 11 '19 at 12:21

We have $$x-1<\lfloor x\rfloor\le x$$ and $$\frac1x\le\frac1{\lfloor x\rfloor}<\frac1{x-1}.$$

Now integrating between $$2$$ and $$n+1$$, and adding $$1$$,

$$1+\log\frac{n+1}2\le\sum_{k=1}^n\frac 1k<1+\log n.$$

The lower and upper bounds equal $$4$$ for $$n=41.17$$ and $$n=20.09$$ and the desired solution will lie in that range.

We can narrow that range by computing more terms explicitly

$$1+\frac12+\frac13+\frac14+\frac15+\log\frac{n+1}6\le\sum_{k=1}^n\frac 1k<1+\frac12+\frac13+\frac14+\frac15+\log\frac n5,$$gives $$32.40$$ and $$27.83$$.

There are good approximations as shown by the previous answers. Doing it intelligently you get very good estimates. However, it seems to me that the exact value of $$n$$ can only be determined by explicit calculations. I used Excel: $$\quad$$ Here is the complete table up to $$n = 32$$. Note that Excel uses $$8$$ decimals, thus the rounding error in these calculations does not affect our result $$n = 31$$. $$\sum_{i=1}^n \frac 1i=H_n$$ For large values of $$n$$ $$H_n=\gamma +\log \left({n}\right)+\frac{1}{2 n}+O\left(\frac{1}{n^2}\right)$$ So, using the first term only $$H_n=k \implies \gamma +\log \left({n}\right) = k \implies n_{(1)} = e^{k-\gamma }$$

Using the first and second term of the expansion, the solution of the equation is given in terms of Lambert function $$H_n=k \implies \gamma +\log \left({n}\right)+\frac 1 {2n} = k \implies n_{(2)} =-\frac{1}{2 W\left(-\frac{1}{2}e^{\gamma -k}\right)}$$

Some results for a few values of integer $$k$$'s $$\left( \begin{array}{ccccc} k & n_{(1)}& n_{(2)} & \text{exact} & H_{n_{(2)}}-k \\ 2 & 4.14866 & 3.6124 & 3.63868 & -6.34\times 10^{-3} \\ 3 & 11.2772 & 10.7654 & 10.7735 & -7.18 \times 10^{-4}\\ 4 & 30.6546 & 30.1505 & 30.1533 & -9.17 \times 10^{-5}\\ 5 & 83.328 & 82.8265 & 82.8275 & -1.21 \times 10^{-5}\\ 6 & 226.509 & 226.008 & 226.009 & -1.63\times 10^{-6}\\ 7 & 615.715 & 615.215 & 615.215 & -2.20 \times 10^{-7}\\ 8 & 1673.69 & 1673.19 & 1673.19 & -2.98 \times 10^{-8}\\ 9 & 4549.55 & 4549.05 & 4549.05 & -4.03 \times 10^{-9}\\ 10 & 12367.0 & 12366.5 & 12366.5 & -5.45\times 10^{-10} \end{array} \right)$$

• Hi Claude. Notice that $\log(n)+\gamma<H_n$ so that $n\ge e^{4-\gamma}$ could be wrong (by chance, it is not). – user65203 Dec 11 '19 at 14:02
• This shows that $H_{31} \ge 4$, but not that $H_{30} < 4$. – Paul Frost Dec 11 '19 at 15:41
• @YvesDaoust. We can do much better at the price of Lambert function which leads to $30+\epsilon$. But you are right. Cheers. – Claude Leibovici Dec 11 '19 at 17:43

According to Harmonic number - Wikipedia, $$\gamma = \lim_{n\to\infty} \left(H_n - \ln\left(n + \frac12\right)\right)$$ converges more quickly than $$\gamma = \lim_{n\to\infty}(H_n - \ln(n)).$$ Indeed, in the present case, $$e^{4 - \gamma} - \frac12 \bumpeq 30.154649$$ zeroes in on the answer pretty well.

Harmonic Number -- from Wolfram MathWorld gives more detail: $$\frac1{24(n+1)^2} < H_n - \ln\left(n + \frac12\right) - \gamma < \frac1{24n^2}.$$ These inequalities suffice to determine $$n$$ exactly, because \begin{align*} H_{30} & < \ln\left(30 + \frac12\right) + \gamma + \frac1{21600} \bumpeq 3.994989, \\ H_{31} & > \ln\left(31 + \frac12\right) + \gamma + \frac1{24576} \bumpeq 4.027244, \end{align*} whence $$n = 31.$$

The references given in the MathWorld article are:

• DeTemple, D. W. "The Non-Integer Property of Sums of Reciprocals of Consecutive Integers." Math. Gaz. 75, 193-194, 1991.

• Havil, J. Gamma: Exploring Euler's Constant. Princeton, NJ: Princeton University Press, 2003.

• Duane W. DeTemple, "A Quicker Convergence to Euler's Constant", Amer. Math. Monthly, 100, No. 5 (May, 1993), pp. 468-470.

There are other inequalities that can be used to determine $$n$$ exactly.

Some are discussed in these books and papers:

• B. Berndt, Ramanujan's Notebooks, Volume 5, Springer, New York, 1998.

• T. J. l'A. Bromwich, An Introduction to the Theory of Infinite Series, Chelsea, New York, 1991.

• E. Cesàro, "Sur la serie harmonique", Nouv. Ann. (3) IV (1885), 295-296.

• A. Lodge, "An approximate expression for the value of $$1+\frac12+\frac13+\cdots+\frac1r$$", Messenger of Mathematics 30 (1904), 103-107.

• Mark B. Villarino, "Ramanujan's Approximation to the $$n$$th Partial Sum of the Harmonic Series" (2004), arXiv:math/0402354 [math.CA].

The simplest of these results is Villarino's Corollary 3, which is originally due to Cesàro ("By the way, this was two years before Ramanujan was born!"), and is given as exercise no. 18 on page 460 of Bromwich's book: $$H_n = \frac12\ln(2m) + \gamma + \frac{c_n}{12m}, \text{ where } m = \frac{n(n+1)}2 \text{ and } 0 < c_n < 1.$$ This gives: \begin{align*} H_{30} & < 3.99498717, \\ H_{31} & > 4.02707722. \end{align*} For comparison, the exact values are: \begin{align*} H_{30} = 4 \times \frac{9304682830147}{9316358251200} & \bumpeq 3.99498713, \\ H_{31} = 4 \times \frac{290774257297357}{288807105787200} & \bumpeq 4.02724520. \end{align*}

• nice and exhaustive answer (+1) – G Cab Dec 11 '19 at 17:01