You want to show that
$\sum_{k=1}^{n} \frac{1}{k} \leq \mathcal{O}(\log(n))$.
This means that there is a constant $c > 0$
and an integer $n_0$
such that
$\sum_{k=1}^{n} \frac{1}{k} \leq c\log(n)$
for all $n \ge n_0$.
Suppose that this is true for some $n$ and $c$.
We want to show that
$\sum_{k=1}^{n+1} \frac{1}{k} \leq c\log(n+1)$
follows.
By the induction hypothesis,
$\sum_{k=1}^{n+1} \frac{1}{k}
= \sum_{k=1}^{n} \frac{1}{k} + \frac1{n+1}
\leq c \log(n) + \frac1{n+1}
$
.
If we could show that
$c \log(n) + \frac1{n+1} \le c \log(n+1)$,
we would be done.
But $\log(n+1) - \log(n)
= \log(1+1/n) > 1/n
> 1/(n+1)
$,
so this inequality holds
for any $c \ge 1$.
To find a particular $c$ and $n_0$,
look at $n = 3$.
$1 + 1/2 + 1/3 < 2 <
c \log 3$ for $c = 2$.
So $c=2$ will work.
Of course the best value of $c$ is 1,
but that is not needed for a $\mathcal{O}$
result - there just needs to be some $c$.
=in notationf(n) = O(g(n)), does not stand for equality. – ypercube Feb 25 at 0:05