BBP-tipo de fórmulas para $\log(3)$ $\log(7)$ base $3$
$$\log(3)=\frac{1}{9}\sum_{k=0}^\infty \left(\frac{9}{2k+1}+\frac{1}{2k+2}\right)\frac{1}{9^{k}}$$
$$\log(7)=\frac{1}{3^5}\sum_{k=0}^\infty \left(\frac{405}{6k+1}+\frac{81}{6k+2}+\frac{72}{6k+3}+\frac{9}{6k+4}+\frac{5}{6k+5}\right)\frac{1}{3^{6k}}$$
give lower bounds
$$\log(3)>\left(9+\frac{1}{2}\right)\frac{1}{9}+\left(\frac{9}{3}+\frac{1}{4}\right)\frac{1}{81}=\frac{355}{324}$$
y
$$\log(7)>\left(405+\frac{81}{2}+\frac{72}{3}+\frac{9}{4}+\frac{5}{5}\right)\frac{1}{3^5}=\frac{1891}{972}$$
From Series and integrals for inequalities and approximations to $\log(n)$
$$\log(2)=\frac{7}{10}-\int_0^1 \frac{x^4(1-x)^2}{1+x^2} dx$$
the upper bound
$$\log(2)<\frac{7}{10}$$
is obtained, and also the convergent approximation
$$\gamma>\frac{15}{26}$$
will be useful.
For your particular case $n=31$, el obligado
$$ H_n \ge \log(n+\frac12)+\gamma$$
given by @leonbloy becomes
$$\begin{align}
H_{31} &\ge \log(2·31+1)-\log(2)+\gamma\\
&=2\log(3) + \log(7) - \log(2) + \gamma\\
&>2\frac{355}{324}+\frac{1891}{972}-\frac{7}{10}+\frac{15}{26}=\frac{253589}{63180}\\
&=4+\frac{869}{63180} \gt 4
\end{align}$$
which proves $H_{31}>4$.
To compute the smallest $n$ such that $H_n$ exceeds an integer $N$,
$$log\left(n+\frac{1}{2}\right)+\gamma>N$$
$$log\left(n+\frac{1}{2}\right)>N-\gamma$$
$$n+\frac{1}{2}>e^{N-\gamma}$$
$$n>e^{N-\gamma}-\frac{1}{2}$$
so
$$n=\lceil e^{N-\gamma}-\frac{1}{2}\rceil$$
The PARI code
for (N=0,28,print(N," ",ceil(exp(N-Euler)-1/2)))
shows that this formula produces the values published in http://oeis.org/A002387, although this does not imply that it agrees forever. The inequality and the formula derived here guarantees exceeding $N$, not doing so with the lowest $$ n posible, como en el OEIS secuencia.