TITLE: Finding the smallest integer $n$ such that $1+1/2+1/3+....+1/n≥9$?
QUESTION [8 upvotes]: I am trying to find the smallest $n$ such that $1+1/2+1/3+....+1/n \geq 9$, 
I wrote a program in C++ and found that the smallest $n$ is $4550$.
Is there any mathematical method to solve this inequality.

REPLY [4 votes]: The idea was given to me by Will Jagy. I am just writing it down because he suggested I do so.
Let $H_n:=\sum_{k=1}^n\frac{1}{k}$ the $n$-th harmonic number. It is known (see here or user17762's answer above) that
$$
H_n=\ln n+\gamma+\frac{1}{2n}+O\left( \frac{1}{n^2}\right)
$$
where $\gamma$ denotes Euler-Mascheroni constant. It is not sufficient to know that to answer your question. You need inequalities, or a precise control of the error term in the expansion. Here are two inequalities which suffice.

Claim: we have
  $$
S_n:=\ln n+\gamma <H_n< \ln n+\gamma+\frac{1}{2n}=:T_n
$$
  for all $n\geq 1$.
Application: with the lhs, a calculator, and $\gamma\simeq 0.5772156649$, we find $H_{4550}>9.00009817>9$. With the rhs, we get $H_{4549}<8.99998828<9$. So $n=4550$ is indeed the first such $n$.

Proof of the claim: first, let us show that $x_n:=H_n-S_n$ decreases. Indeed
$$
x_n-x_{n+1}=-\ln n+\ln(n+1)-\frac{1}{n+1}=-\ln\left(1-\frac{1}{n+1} \right)-\frac{1}{n+1}>0
$$
where the last inequality follows for instance from the study of $f(x)=-\ln(1-x)-x$ on $(0,1)$. Since $\lim x_n=0$, it follows that $x_n>0$ for all $n\geq 1$. That is the lhs inequality. 
Now let $y_n:=H_n-T_n$ and let us check that it increases. We have
$$
y_{n+1}-y_n=\frac{1}{2(n+1)}+\frac{1}{2n}-\ln\left(1+\frac{1}{n}\right)>0
$$
where the inequality follows from the fact that the corresponding function of $x$, instead of $n$, is decreasing on $(0,+\infty)$ with limit $0$ at $+\infty$. So $y_n$ is increasing with limit $0$. This means that $y_n<0$ for all $n\geq 1$, which proves the rhs inequality. QED.