The harmonic series is the "infinite sum" of all the fractions of the form \$\frac1n\$ for \$n\$ positive integer. I.e. the harmonic series is
$$\frac11 + \frac12 + \frac13 + \frac14 + \cdots$$
It is well-known that this sum diverges, which means that if you define
$$ H_n = \frac11 + \frac12 + \cdots + \frac1n$$
Then the value of \$H_n\$ goes to infinity. This can also be stated in a different way: for any positive value \$x\$ you pick, there is some value \$N\$ such that, to the right of \$N\$, the \$H\$ values are bigger than \$x\$:
$$\forall\ x\ \exists\ N: n > N \implies H_n > x $$
Your task
Write a program/function that takes as input a positive number x
(not necessarily an integer) and outputs the first integer n
for which
$$H_n \geq x$$
In theory your program must work for arbitrary x
, even if in practice you are limited by the memory and/or precision of your programming language/computer.
Test cases
1.5 -> 2
2 -> 4
3 -> 11
3.1415 -> 13
4 -> 31
5 -> 83
7.5 -> 1015
10 -> 12367
This is code-golf so shortest solution wins! Standard loopholes are forbidden by default. Happy golfing.