## Task 3B - 191233B

Determine whether there exist natural numbers $n$ for which

$$
\frac{1}{n}+\frac{1}{n+1}+\ldots+\frac{1}{n^{2}}>1000
$$

holds.

If this is the case, investigate whether there exists a natural number $p$ such that every (in the decimal system) $p$-digit number $n$ has property (1). If this is also true, determine such a number $p$.
We use a known inequality of the natural logarithm, namely:

$$
x>\ln (1+x) \quad \forall \quad x>0
$$

Therefore,

$$
\frac{1}{n}>\ln \left(1+\frac{1}{n}\right)=\ln \frac{n+1}{n}=\ln (n+1)-\ln n
$$

The sum in the problem statement is then

$$
s=\sum_{k=n}^{n^{2}} \frac{1}{k}
$$

With the above inequality, we have:

$$
s>\sum_{k=n}^{n^{2}}(\ln (k+1)-\ln k)=\ln \left(n^{2}+1\right)-\ln n
$$

(The sum is a telescoping sum). Thus,

$$
s>\ln \frac{n^{2}+1}{n}
$$

If this term is greater than 1000, then $s>1000$. Therefore, a sufficient condition is:

$$
\frac{n^{2}+1}{n}>e^{1000}
$$

Obviously, $n$ is very large, so that $(n^{2}+1)$ can be approximated by $n$. Then,

$$
n>e^{1000} \approx 1.97 \times 10^{434}
$$

This is a 435-digit number. $1.0 \times 10^{434}$ is also 435-digit, but significantly smaller than the mentioned lower bound. Only when the number of decimal places is at least 436, the inequality is always satisfied. Therefore, $p \geq 436$.

2. Solution:

It is

$$
\int_{n}^{n+1} \frac{1}{x} \, \mathrm{d} x1000 \\
\frac{n^{2}+1}{n}=n+\frac{1}{n}>e^{1000}
\end{gathered}
$$

From this, it follows:

$$
n=\left\lceil e^{1000}\right\rceil \approx 1.97 \times 10^{434}
$$

This is a 435-digit number. $1.0 \times 10^{434}$ is also 435-digit, but significantly smaller than the mentioned lower bound. Only when the number of decimal places is at least 436, the inequality is always satisfied. Therefore, $p \geq 436$.

Note: The sum can also be calculated exactly using the so-called "generating function": Let

$$
s(x)=\sum_{k=n}^{n^{2}} \frac{x^{k}}{k}
$$

where $s(1)$ represents the desired sum. Differentiating once:

$$
\begin{gathered}
s^{\prime}(x)=\sum_{k=n}^{n^{2}} x^{k-1}=x^{n-1}+x^{n-2}+\ldots+x^{n^{2}-1} \\
s^{\prime}(x)=\sum_{k=0}^{n^{2}-1} x^{k}-\sum_{k=0}^{n-2} x^{k} \\
s^{\prime}(x)=\frac{x^{n^{2}}-1}{x-1}-\frac{x^{n-1}-1}{x-1} \\
s^{\prime}(x)=\frac{x^{n^{2}}-x^{n-1}}{x-1} \\
s(x)=\int_{0}^{x} \frac{t^{n^{2}}-t^{n-1}}{t-1} \, \mathrm{d} t
\end{gathered}
$$

since $s(0)=0$. Therefore,

$$
\sum_{k=n}^{n^{2}} \frac{1}{k}=\int_{0}^{1} \frac{t^{n^{2}}-t^{n-1}}{t-1} \, \mathrm{d} t
$$

This does not help with the above estimation, as this integral is not solvable in elementary terms except by sum formation, which brings us back to the starting point.

## Both solutions by MontyPythagoras